To squash multiple commits, I have always used:
git reset --soft HEAD~<number of commits to squash> && git commit
But I wonder if there is a good way to do this in a good git client like git extensions? It would be cool if you could just select consecutive commits and squash them.
There are multiple ways of doing a squash.
Here's how you can easily squash the current and all its immediate parent commits into a single commit in Git Extensions:
Here's an animation of the above:
Another way is to do an "interactive rebase" either
git rebase -i
, read docs), orTo do an interactive rebase in Git Extensions:
Here's an animation of the above: