Skip to content

Instantly share code, notes, and snippets.

@pawiromitchel
Last active June 11, 2019 20:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pawiromitchel/7261a414fcdfbf0e0388d5eda8065291 to your computer and use it in GitHub Desktop.
Save pawiromitchel/7261a414fcdfbf0e0388d5eda8065291 to your computer and use it in GitHub Desktop.
Cherry picking from a forked repository
# add the second fork, code you want to take from
git remote add <fork_repo_name> <fork_repo_url>
git fetch <fork_repo_name>
# view the branches
git branch -a
# get the hash
git log <fork_repo_name>
# merge the code
git cherry-pick <commit_hash>
git push <origin_branch>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment