Skip to content

Instantly share code, notes, and snippets.

@mattkasun
Created February 22, 2018 14:09
Show Gist options
  • Save mattkasun/2296fb8c28a2e78100858610613d4e99 to your computer and use it in GitHub Desktop.
Save mattkasun/2296fb8c28a2e78100858610613d4e99 to your computer and use it in GitHub Desktop.
Cherry Pick a commit
Let's say you want to apply some patches from someone else repository:
# Cloning our fork
$ git clone git clone git@github.com:ifad/rest-client.git
# Adding (as "endel") the repo from we want to cherry-pick
$ git remote add endel git://github.com/endel/rest-client.git
# Fetch their branches
$ git fetch endel
# List their commits
$ git log endel/master
# Cherry-pick the commit we need
$ git cherry-pick 97fedac
# Pushing to our master
$ git push origin master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment