


Delete the conflict markers > and make the changes you want in the final merge. If you have questions, pleaseĭecide if you want to keep only your branch's changes, keep only the other branch's changes, or make a brand new change, which may incorporate changes from both branches. In this example, one person wrote "open an issue" in the base or HEAD branch and another person wrote "ask your question in IRC" in the compare branch or branch-a. To see the beginning of the merge conflict in your file, search the file for the conflict marker > BRANCH-NAME. Open your favorite text editor, such as Visual Studio Code, and navigate to the file that has merge conflicts. > no changes added to commit (use "git add" and/or "git commit -a") In this example, the file styleguide.md has a merge conflict. Generate a list of the files affected by the merge conflict. Navigate into the local Git repository that has the merge conflict. You must resolve this merge conflict with a new commit before you can merge these branches. To resolve a merge conflict caused by competing line changes, you must choose which changes to incorporate from the different branches in a new commit.įor example, if you and another person both edited the file styleguide.md on the same lines in different branches of the same Git repository, you'll get a merge conflict error when you try to merge these branches. For more information, see " Resolving a merge conflict on GitHub." Competing line change merge conflicts Tip: You can use the conflict editor on GitHub to resolve competing line change merge conflicts between branches that are part of a pull request.
