Hacker News new | ask | show | jobs
by Seb-C 1065 days ago
Wow, I never realized that changing the order of commits in an interactive rebase was a legit operation.

Thanks for the tip!

1 comments

Another way to handle this if you haven't made the change yet is to do a `git rebase -i head~4` (or however far back) and mark the place where the change needs to happen as "edit". Make your change, add the file, then `git rebase --continue`.

If you've already made the change but haven't committed it, you can stash it before doing the rebase, then pop the stash while editing that commit.