I find myself doing this sometimes:
git rebase -i HEAD~2
This shows me two commits, HEAD~1
and HEAD
. I change pick
to f
to fix up HEAD
into HEAD~1
. Now I combined my two most recent commits into a single commit that only has the commit message from the older commit.
Is there a command/shortcut/option to do this quickly?
What if I want to fix up the three most recent commits into the fourth most recent commit?
The only solution I was able to find was to write a script that does this for you. But I'm looking for something that's already built into git.