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>
@dwickeroth
Copy link

Thank you!

@kwakueshun
Copy link

Saved me 8 years later 🎉

@cat-bro
Copy link

cat-bro commented Oct 6, 2020

❤️

@Danielduel
Copy link

Thanks after 10 years

@hemals24
Copy link

Works after 10 years

@ErickRamirezDS
Copy link

+1 thanks! Ten years on and still works. Thanks to @gsheasby too for the tip on adding a new remote alias. 🍻

@kentokage
Copy link

Thank you! Also thanks to @gsheasby for the remote alias tip!

@sid226
Copy link

sid226 commented Jul 15, 2022

Thanks! may all lost souls find this sooner.

@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