Git squash and merge two commits into one

Public, Git


Created: Jul 02, 2015     Updated: Aug 13, 2015

$ git rebase --abort
$ git rebase --interactive HEAD~2

If you want to squash all of the commits back to origin/master run: $ git rebase -i master

You leave the first commit as pick, change all the rest to squash, then edit the commit message

Then you will have to force push changes to GitHub

$ git push origin dashboard-views --force