-
Notifications
You must be signed in to change notification settings - Fork 37
Resolving Pull Request merge conflicts
When you submit a Pull Request (PR) there may be conflicts between your submitted code and what is already present in the project repo development branch. (Note that this will rarely happen if you rebase your feature branch against development - see steps 5 and 6 here.
Github indicates PR conflicts with this message: This branch has conflicts that must be resolved.
This process can be followed to address the conflicts. All of the git commands are executed in your local repo.
git checkout <feature-branch-name>
git pull upstream development
The "pull" command will execute a fetch and a merge.
The merge will fail due to the conflicts.
The output of the command will indicate which files have conflicts.
git add .
git commit -m 'resolved PR #nn merge conflicts'
git push origin <feature-branch-name>
Go back to the Github page showing the status of your PR. After the CI tests are run, you should see this message:
This pull request can be automatically merged by project collaborators.