Interactive rebase
Interactive rebase is rebase while tidying up the branch. It's mostly the "tidying up" component that people will use it for.
Imagine you make a large number of commits in a rush, may be under the deadline's pressure. You later find out:
Some commits are not critical and can be omitted
Some commits should be merged into one.
Some commits have bad commit messages.
etc.
Command
It's still rebase, but with the interative flag
What this will do is to
list all commits in the branch to be rebased, and
ask you what to do for each of them. E.g. whether to use the original commit, or modify it, or delete it.
Options include:
The default option is pick
which means use the commit. If all commits are picked, the scenario reduces to a normal rebase. But you can choose to drop, edit or squash the commits, which normal rebase won't allow you to do.
Last updated