Skip to content

Instantly share code, notes, and snippets.

@brianzelip
Last active September 24, 2023 11:22
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 brianzelip/5e8d6784da59486ba066406ddf363b58 to your computer and use it in GitHub Desktop.
Save brianzelip/5e8d6784da59486ba066406ddf363b58 to your computer and use it in GitHub Desktop.
Cherry pick a commit from a remote repository

Cherry pick a commit from a remote repository

# list remotes
git remote -v

# add remote if needed
git remote add xyz git@github.com:xyz/project.git

# fetch remote data
git fetch xyz

# find the commit on a particular branch
git log xyz/branch-name

# cherry pick the commit into local repo
git cherry-pick 1234567890

Via https://stackoverflow.com/a/56137964/2145103

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