@@ -9,33 +9,34 @@ tags: ["git", "version control"]
99
1010## Fix merge conflict with a pull request
1111
12- Sometimes a pull request warnings about a merge conflict.
13- A merge conflict occurs when one or more lines were altered both in the base branch as in the issue branch.
12+ Sometimes a pull request warns about a merge conflict.
13+ A merge conflict occurs when one or more lines were altered in the base branch so that a merge conflict arises in the feature branch.
1414The warning looks like the image below.
1515
1616![ Message indicating a merge conflict on GitHub.com] ( merge-conflict-1.png )
1717
1818You can fix most merge conflicts in the browser.
1919First push the ` Resolve conflict ` button in the warning.
2020The website sends you to a page with a list of all merge conflicts.
21- The website highlights them by the red vertical line with yellow background between the line numbers and the code .
22- Every merge conflict inserts three delimiters.
21+ The webpage highlights them by a red vertical line.
22+ Every merge conflict inserts three delimiters:
2323
24- 1 . ` <<<<<< issue branch name ` : the start of the merge conflict
24+ 1 . ` <<<<<< feature branch name ` : the start of the merge conflict
25251 . ` ====== ` : the separator between the content of both branches
26261 . ` >>>>>> base branch name ` : the end of the merge conflict
2727
2828![ Source with a merge conflict on GitHub.com] ( merge-conflict-2.png )
2929
3030Fix the merge conflict by changing the source.
31- Often you can fix it by simply deleting the content of one to the branches within the conflict.
31+ Often you can fix it by simply deleting the content of one of the branches within the conflict.
3232Potentially you need to keep a mix of both.
33- Should fixing the merge conflict is more complicated, then you probably better should fix them via the [ command line] ( ../git_conflict/index.html ) .
34- In our example we solved the conflict by keeping the content of the issue branch.
33+ Don't forget to also delete the three delimiters when you're ready.
34+ Should fixing the merge conflict be more complicated, then you probably better fix them via the [ command line] ( ../git_conflict/index.html ) .
35+ In our example we solved the conflict by keeping the content of the feature branch.
3536
3637![ Solved merge conflict on GitHub.com] ( merge-conflict-3.png )
3738
38- Once you fixed all merge conflict , go to the top of the page.
39+ Once you have fixed all merge conflicts , go to the top of the page.
3940There hit the ` Mark as resolved ` button.
4041
4142![ Mark a merge conflict as resolved on GitHub.com] ( merge-conflict-4.png )
0 commit comments