Squashing 2 commits in one git add git commit -m "$(whatthecommit.py)" git rebase -i HEAD~2 # on the screen, change the modified commit from pick to squash # then comment the second commit message, keeping the original one git push -f origin