Shakti Kumar
Shakti Kumar

Reputation: 137

Git fork issue when we have multiple pull requests conflicting on a same file

I have a situation. I have master branch for which developers will maintain their own forked repository and raise a pull request. For example, if I have 3 pull requests raised for the same file for which one pull request has been approved and the other pull requests were failed due to conflicts.

Since the files were already committed to forked repository, how to address these conflicts?

Upvotes: 0

Views: 36

Answers (1)

alfunx
alfunx

Reputation: 3140

After merging the approved pull request, tell the developers to fix their branches. They can rebase their branch on top of your new master, or they can merge master into their branch. Both approaches will result in conflicts, which the developers can now solve. After pushing their updated branches you can do another round of review and approve the pull request.

If you think you can fix the conflicts (conflicts are simple / you're familiar with that code / ...) you can simply checkout their branch in your local repository, merge or rebase on the new master and then merge it into master. Then push your master and close their pull request.

Upvotes: 1

Related Questions