rebase todo list
The text file an interactive rebase opens, one line per commit, where the first word says what to do with that commit.
In more detail
pick keeps a commit as it is, reword keeps it but lets you edit the message, squash melds it into the commit above, fixup does the same and discards its message, and drop removes it. Reordering the lines reorders the commits. Git keeps the file as .git/rebase-merge/git-rebase-todo while the rebase runs.
Examples
pick 1a2b3c4 Add login buttonsquash 5d6e7f8 Fix button alignmentRelated terms
- interactive rebase — A rebase that first opens a todo list in your editor, letting you reorder, reword, squash or drop commits before they are replayed.
- squash — Combining several commits into one, for example small fix-up commits into the commit they fix.
Taught in
- Installing Git, And Telling It Who You Are — Advanced Git Internals & Distributed Workflows
- Reading History: log, show And diff — Advanced Git Internals & Distributed Workflows
- HEAD, And Why Detached HEAD Is Not An Error — Advanced Git Internals & Distributed Workflows
- Rebase: The Same Work, A Different History — Advanced Git Internals & Distributed Workflows
- Undoing: restore, reset, revert And stash — Advanced Git Internals & Distributed Workflows
- What A Remote Actually Is — Advanced Git Internals & Distributed Workflows
- Interactive Rebase: Squash, Reorder, Reword — Advanced Git Internals & Distributed Workflows
- Cherry Picking, Reflog, And Getting Work Back — Advanced Git Internals & Distributed Workflows