Thursday, October 25, 2018

Git: Resolve Conflicts in PR

What to do when GitHub does not allows you to merge a Pull Request due to conflicts!
First of all, rebase often to avoid this problem in most cases.
Sharing bits from my experience. The solutions that worked for me are:

1. git rebase

The best way is to do it locally using terminal or command prompt. Lets say you raised a PR from origin/develop to upstream/develop branch and got conflict. Go to your command prompt, rebase master onto develop and push to develop branch. PR should get resolved.
But this won’t work when the tips are just big time outdated.