Skip to content

Instantly share code, notes, and snippets.

@mrtrkmn
Created May 25, 2022 20:47
Show Gist options
  • Save mrtrkmn/fe3c711a2532cfcba04d9cf45a5f6486 to your computer and use it in GitHub Desktop.
Save mrtrkmn/fe3c711a2532cfcba04d9cf45a5f6486 to your computer and use it in GitHub Desktop.
cherrypick: select and move some commits from one repo to another

git cherry-pick is generally used to get specific commit from one branch to another. It can also be used to move commits from one repository to another repository. It can be done in following ways:

$ git remote add newrepo <new-repository-link> 
$ git fetch newrepo
$ git cherry-pick <commit-sha>

Make sure you are on the branch that you would like to merge.

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