The Git rebase todo list is a text file that opens automatically during an
interactive rebase (git rebase -i). It acts as a script, executing commands on
your commit history chronologically from top to bottom.
| Command | Short | Action |
|---|---|---|
| pick | p | Keeps the commit as it is. |
| reword | r | Keeps the commit but lets you change the message. |
| edit | e | Pauses the rebase to let you amend the files in that commit. |
| squash | s | Combines the commit into the previous one, merging both messages. |
| fixup | f | Combines the commit into the previous one but discards this commit’s message. |
| drop | d | Deletes the commit from history |
| exec | e | Runs a shell command (exp: tests / linters) after that specific commit. |
Resume the process: Save and exit your editor, resolve conflicts if they
happen, and run git rebase --continue to proceed.
Safely back out: If you make a mistake or get lost, type git rebase --abort
to return your project safely to its original state.