Hacker News new | ask | show | jobs
by izoow 806 days ago
I recently found out that git rebase has a --exec option that allows you to execute a shell command for each commit. If the command fails, the rebase pauses and allows you to make changes to make the command pass. I use this to make sure that there is no commit that leaves my project in an unbuildable state.
1 comments

You can also use `--interactive` to do a lot of complicated stuff.
FWIW, you can use `git rebase --edit-todo` in the middle of an interactive rebase, just in case you changed your mind about what comes next.