Say someone submits a PR to public/master on Github. It’s 99% OK but for the remaining 1%, I don’t want to go back and forth with the PR-review and he-fix and I-review-again cycles, and want to go straightforward and fix them myself.
Is there a way to do further work on github PR myself before merging it?
- The merge that PR into a new dev branch seems not to be an option, and
- The Checking out / Modifying pull requests locally doc doesn’t work for me:
$ git fetch origin pull/11
fatal: couldn't find remote ref pull/11
And the normal git pull
command to manually pull the changes of the PR into my local repo doesn’t work for me either:
$ git pull
Current branch master is up to date.
$ git branch -a
* master
remotes/origin/HEAD -> origin/master
remotes/origin/master
As when I check the branches in github, there is no branch for that PR.
>Solution :
You can do a git pull
command to manually pull the changes of the PR into your current branch, whether it is the main branch or a development branch. Just look below the pull request on GitHub and click the little link that says "command line instructions". You can ignore most of the instructions and just look for the one line that starts with git pull
.
Then make whatever commits you want and push your changes to wherever is appropriate.