> For the complete documentation index, see [llms.txt](https://yu-sun.gitbook.io/essential-git-for-scientists/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://yu-sun.gitbook.io/essential-git-for-scientists/cookbook/interactive-rebase-1.md).

# Interactive rebase

### Commands

* `git rebase -i master new_feature`
  * `-i` will trigger the interactive mode.
* Can be used just to edit the commit history
  * `git rebase -i HEAD~3`

Interative rebase will open `git-rebase-todo` for you to edit what to do.

Options:

* `pick` - use
* `drop`
* `reword` - change the commit message
* `edit` - to amend changes along with the commit
* `squash`
* `fixup`
* `exec`
