Skip to content

Instantly share code, notes, and snippets.

@bhumphrey
Created September 22, 2012 03:10
Show Gist options
  • Save bhumphrey/3764983 to your computer and use it in GitHub Desktop.
Save bhumphrey/3764983 to your computer and use it in GitHub Desktop.
Cherry-picking from another fork
git checkout <branch>
git fetch <other-fork-alias>
git cherry-pick <commit-hash>
git push <your-fork-alias>
@bkw777
Copy link

bkw777 commented Nov 10, 2022

Thank you.

@biemster
Copy link

biemster commented Feb 9, 2023

Saved me 11 years later 🥳

@sakthisunda
Copy link

sakthisunda commented Mar 6, 2023

Thanks. Works even in 2023 with no changes. 🙏 With remote add from @gsheasby

@pritster5
Copy link

So is the final version of this supposed to be the following?:

git checkout <branch>
git remote add <other-fork-alias> <other-fork-URL>
git fetch <other-fork-alias>
git cherry-pick <commit-hash>
git push <your-fork-alias>

@shubhamshinde360
Copy link

Still works 11 years later!

@eightycc
Copy link

A treasure. Many thanks!

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