I send a PR from origin Project/myBranch
to an upstream Project/master
and what I want to do is pull a specific commit with its SHA and add that commit to the myBranch
branch and update that PR. So how should I do it? I have been struggling to do this for over an hour but still no success.
Asked
Active
Viewed 208 times
-3

Bhavay Anand
- 335
- 1
- 5
- 16
-
3Possible duplicate of [What does cherry-picking a commit with git mean?](https://stackoverflow.com/questions/9339429/what-does-cherry-picking-a-commit-with-git-mean) – arghtype Jan 09 '19 at 20:02
1 Answers
0
You could cherry-pick the commit into your branch and push the branch to Github again (the PR will be automatically updated when you push the branch again).
From your local clone of Project, assuming the upstream Project is origin
:
git fetch origin
git checkout myBranch
git cherry-pick <SHA of the specific commit>
git push origin myBranch
You need to fetch from origin if you not already have fetched the specific commit.
Other changes that you may have been committed to your branch will also be pushed and included in the PR.

joran
- 2,815
- 16
- 18