When both sides change the same lines incompatibly, Git may stop a merge for a person to decide the result. Other kinds of conflict exist too. Start merges with a clean working tree so abandoning one is safer.
Suppose main changes the same line to Units: metric, while map-key changes it to Units: imperial. After git switch main and git merge map-key, Git reports a conflict and exits unsuccessfully. git status lists unmerged paths. A text file may contain:
<<<<<<< HEAD
Units: metric
=======
Units: imperial
>>>>>>> map-key
The top section is the current branch and the bottom is the incoming branch. Labels and an optional base section vary with configuration. Read both changes and their purpose; the correct result might use one, both, or a new wording. Edit the file, remove all conflict markers, and check the resulting content. For a file called settings.txt:
git add settings.txt
git status
git commit --no-edit
Staging marks the path resolved; it does not prove the decision is correct. Finish only after resolving all paths, then review and test. git merge --continue is another way to finish and may open an editor. If the merge is still in progress and should be abandoned, git merge --abort attempts to restore the pre-merge state; pre-existing uncommitted changes can complicate recovery. It does not undo a completed merge.