StatsSorceress
StatsSorceress

Reputation: 3099

How do I accept *some* changes in a pull request?

I'm editing a document with a coworker, who has sent me a pull request. My coworker has edited many lines in the document. Some of the changes I'd like to accept, but others I want to leave out. Is there a way to do this with git (specifically with GitHub)?

Upvotes: 1

Views: 1531

Answers (2)

Mohammad
Mohammad

Reputation: 1990

The recommended flow is that you provide feedback by the way of comments during the review to your coworker so that they make changes and request the merge again. The positive side to this is that you share the view with them and agree on this going forward.

GitHub provides means to do this you can read more about this here: https://help.github.com/articles/about-pull-request-reviews/


Alternatively, if you really want to make the changes yourself on top of their changes without asking them to do these changes you can push a commit with your changes to their branch and afterwards accept the merge request. But they should have not opted to prevent other users to make modifications to their branch. Read more details on this answer: Adding commits to another person's pull request on GitHub

Upvotes: 2

bergmeister
bergmeister

Reputation: 969

As far as I am aware the GitHub web UI does not provide that but using git you could do this in many ways. See the GitHub guide here how to merge a modified version of a PR.

Upvotes: 1

Related Questions