Skip to content

Instantly share code, notes, and snippets.

@AurelioDeRosa
Created June 8, 2015 21:02
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save AurelioDeRosa/c1dd77a3619729e1518f to your computer and use it in GitHub Desktop.
Save AurelioDeRosa/c1dd77a3619729e1518f to your computer and use it in GitHub Desktop.
Git commands to cherry pick commits
git checkout -b otherrepo-master master
git pull https://github.com/otherrepo/my-repo-name.git master
git checkout master
git cherry-pick --strategy=recursive -X theirs <commit-hash>
git log
git branch -D otherrepo-master
git push origin master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment