Skip to content

Instantly share code, notes, and snippets.

@sindresorhus
Created May 7, 2012 20:01
  • Star 7 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save sindresorhus/2630026 to your computer and use it in GitHub Desktop.
Git merge squash author commit and push - cheatsheet
git checkout master
git checkout -b bug123
git pull http://repourl.git branch
git log | grep "Author" | head -1 # get the author
git checkout master
git merge --squash bug123
git commit -a --author="Author" --message="Close #1: Title. Fixes #666"
git push origin master
@oleg-nenashev
Copy link

More generic version for GitHub PRs: https://gist.github.com/oleg-nenashev/ec7dea01dcf272e9b891

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment