How do I squash 2, 3 and 4 into a single commit?
- last commit
- last commit -1
- last commit -2
- last commit -3
- last commit -4
How do I squash 2, 3 and 4 into a single commit?
Interactive rebase as told by matt, or this way, with no interactive stuff:
git checkout commit2
git reset --soft commit5
git commit -m "Here's the squash"
git cherry-pick commit1
Done!