Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how can I cherry pick from upstream to my fork

Tags:

github

I am very new in git hub my apologies for this naive question I just forked a repository and I want to cherry pick from the original repo to my fork here is what I did

git cherry pick 9fb44607a2ae89fb5b3a6b81sssdfsdadb0ec5

but I got this error

fatal: Unknown commit 9fb44607a2ae89fb5b3a6b81sssdfsdadb0ec5

what is the proper command to do such action

thank you

like image 839
Waterfr Villa Avatar asked Oct 15 '25 15:10

Waterfr Villa


1 Answers

but I am using real hash when I run the command

If that real hash:

  • come from the upstream repository (the one you have forked)
  • has been created after your fork

You would then need to fetch from upstream in order for that commit to be present in your local repository (clone of your fork).

cd /path/to/my/cloned/fork
git remote add upstream https://url/original/repository
git fetch upstream

Then you can cherry-pick that SHA1.

like image 147
VonC Avatar answered Oct 17 '25 09:10

VonC



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!