Git sample repo for demonstrating git merge --squash Made a lot of commits in the dev branch and messed up your git history? Use git merge --squash to "squash" all these commits into one. Messed up your git history? Use git merge squash to clean it. post demonstrates git merge --squash demo. Git Tricks: git commit –amend + git force –push