Squash all my commits into one for GitHub pull request [duplicate]

Just a simple addition to help someone else looking for this solution. You can pass in the number of previous commits you would like to squash. for example,

git rebase -i HEAD~3 

This will bring up the last 3 commits in the editor.

Leave a Comment