https://stackoverflow.com/questions/8879375/git-push-push-all-commits-except-the-last-one git push origin HEAD^:master you can find more information about specifying revisions in http://schacon.github.io/git/gitrevisions.html