Skip to content

Instantly share code, notes, and snippets.

@jbouhier
Last active February 14, 2023 22:27
Show Gist options
  • Save jbouhier/a00690792aa78569d4625900621addcf to your computer and use it in GitHub Desktop.
Save jbouhier/a00690792aa78569d4625900621addcf to your computer and use it in GitHub Desktop.

Git Cherry pick - Cheat sheet

Cherry picking into branch2update

  • Copy hash of the commit you want git log
  • Switch to the branch you want to update: git checkout branch2update
  • From branch2update, create new branch: git checkout -b <new-branch>
  • Cherry pick commit: git cherry-pick <hash-of-wanted-commit>
  • Push new branch: git push --set--upstream origin <new-branch>
  • On Gitlab, open a MR into branch2update
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment