Received a pull-request from someone else, how to edit it before merging directly on github?

(For reference, here is a command line git solution How to handle review a pull-request, modify code, and merge?)

Here I’m looking for a 100% in-browser solution directly in the Github interface.

  • I have a repo foobar
  • I receive a pull request from user bob
  • I would like to make a few tiny edits on his modifications, and merge this PR

How to do this 100% from the Github interface, without having to open a command-line and do git ... operations?

Note: I don’t want to merge bob‘s as it is, and do modifications later in a further commit. I would like to edit his PR before merging it to my project.

>Solution :

First go in the Files changed tab of the pull request. There you could edit the files with the Edit file button.

enter image description here

That works if you have write access to the repo and the pull request author enables Allow edits by maintainers. (Enabled by default)

enter image description here

The checkbox could also be checked or unchecked after creating the pull request.

Leave a Reply