Squash Git Commits
2018-10-16
Ever made several commits on a feature branch and needed to rebase? Rebasing multiple commits can be tedious if there is a conflict from an early commit, requiring a commit resolution in every commit that follows. It can be practical, therefore, to squash multiple commits into a single commit before rebasing.
Ever wanted to clean up your commit history before pushing? I often make quick commits if I’m required to switch branches, or spiking an idea during development that ends up being permanent. I’m left with messy commit messages that rarely follow best practice. Squashing commits to the rescue again! I can then take the time to carefully construct a commit message.
…