-
Notifications
You must be signed in to change notification settings - Fork 0
Resolving Code Conflicts
Kumar Damani edited this page Feb 8, 2019
·
1 revision
This document is intended for developers to resolve conflicts from pull requests
I want to merge my (dev.) branch "feat/35" into the (target) branch "QA".
- I start to create a pull request from GitHub.com for this merge directly
- I notice that there are some conflicts reported in the preview
- I cannot continue this merge as is, I have to fix this pull request such that no conflicts show up for the reviewers.
If you have already created a pull request with reviewers, and conflicts, please delete this request.
- Create a (temp) branch from QA (the target branch) called "qa-temp-merging-feat35" or something similarly obvious.
- Ensure you have the latest qa branch in your local environment.
- Checkout the (temp) branch "qa-temp-merging-feat35" at the terminal
- Merge (dev) branch into the (temp) branch manually (terminal). This is where I consult another developer who worked on this portion of the file to resolve the conflict harmoniously 😆
- Commit and push to complete the merge.
- Create a new pull request from (temp) "qa-temp-merging-feat35" to (target) "QA" at Github.com, now the preview should not be showing any conflicts.
- Add two reviewers
- Once passed, complete the merge
- Congrats! You have successfully merged (dev.) "feat/35" into (target) "QA". (though indirectly)
- As per best practices, you should delete the temp branch you created in this process, so that the repo is clean.
- Step 4: (dev) -> (temp)
- Step 6: (temp) -> (target)
- == (dev) -> (target)