Resolve Conflict button is disabled

I recently created a pull request to a branch of a repository (which I have no write access to) and there are some conflicts. But the resolve conflict button is disabled due to the complex. Now how can I resolve this?

I guess I have to resolve this locally and push to the same PR. But I am not sure what to do. More descriptive answer will truly help me since I am not a pro for GitHub.

Thank you!

There are two common ways to resolve this, and yes, both are local. Either way you need to have the repository you want to merge into configured as a remote in your local repository, I’ll assume that remote is called upstream.

  1. Rebase your branch on the upstream branch you want to merge into. This will recreate each commit on the branch starting from the upstream branch, and you’ll have to resolve conflicts on each commit.
git checkout your-branch
git rebase upstream/master
  1. Merge the upstream branch into your local branch. This does not modify your existing commits, and instead adds the new upstream commits plus a merge commit. You’ll have to resolve conflicts during the merge.
git checkout your-branch
git merge upstream/master

When done, push to the same branch you started the pull request from. With the rebase option you’ll have to force-push, so double check the result is correct. The pull request should be updated automatically when you push.

2 Likes

Thanks a lot. This helped!!!

1 Like