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

Last updated