Any article about rebase is incomplete without the mention of `git commit --fixup fb2f677`. When committing you usually already know which commit you’re “fixing” so you specify that.
Then you run `git rebase -i --autosquash origin/main` instead and the commits are already in the right order.
Even when I do know which commit I am fixing I usually don't know the commit hash without looking it up - and doing that takes as long as manually reordering the lines in an interactive rebase.
Then you run `git rebase -i --autosquash origin/main` instead and the commits are already in the right order.