How to do further work on github PR before merge?

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?

$ 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.

Leave a Reply