Autosquashing and fixups
suggest changeWhen committing, you can mark the new commit so a later rebase will squash it into an earlier one:
git commit --squash=<commit>
Alternatively, --fixup=<commit> creates a fixup commit.
You can also name the target by a word in its message instead of a hash:
git commit --squash :/things
That selects the most recent commit whose message contains things.
These commits’ messages begin with fixup! or squash!, followed by the message of the commit they will be squashed into.
Pass --autosquash when you rebase to apply them.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents