Skip to content

Instantly share code, notes, and snippets.

@ViktorAndonov
Last active November 8, 2022 11:37
Show Gist options
  • Save ViktorAndonov/86e291332182d9ad29bb to your computer and use it in GitHub Desktop.
Save ViktorAndonov/86e291332182d9ad29bb to your computer and use it in GitHub Desktop.
How to cherry pick commits
0.1) Use the terminal;
1) Make sure there is no changes in both branches (git status);
2) Checkout the brach that you want to take the commit from;
3) Use git log to show the full number of the commit that you want to cherry pick, and copy it from the teminal;
4) Now checkout the branch that you want to recive;
5) Then write: git cherry-pick [the number of the commit that you want to take, without brackets]
6) You are done! or if conflicts appear resolve them manually;
7) Then commit the changes;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment