Resolve merge conflicts using the command line
Last updated
Last updated
The most direct way to resolve a merge conflict is to edit the conflicted file. Open the merge.txt
file in your favorite editor. For our example lets simply remove all the conflict dividers. The modified merge.txt
content should then look like:
Once the file has been edited use git add merge.txt
to stage the new merged content. To finalize the merge create a new commit by executing:
Git will see that the conflict has been resolved and creates a new merge commit to finalize the merge.