Is there a name for the merge conflict syntax Git uses?
When one gets a conflict, the conflict(s) are marked in the file as:
<<<<<<< HEAD <p>Once she climbed a tree and then forgot how to climb back down again</p> ======= <p>Once, forgot where her food bowl was and was hungry all day</p> >>>>>>> prequel
Is there a name for this syntax? It seems pretty common across VCSs.
- What Visual Studio files should be ignored by subversion to minimize conflicts?
- Eclipse egit : How to synchronize with remote repo?
- Git: trouble with setting up daemon, trouble with git clone
- How do I test a local Git branch on the remote Git server, when the local branch does not exist on the remote server, no merge with the origin/master?
- In there any way to mark code to prevent it from being committed to SVN or Git?
- Viewing changes in branch using Xcode Version Editor?
2 Solutions collect form web for “Is there a name for the merge conflict syntax Git uses?”
Git calls this “conflict markers”
Git automatically adds conflict markers to the affected areas. A conflict-marked area begins with <<<<<<< and ends with >>>>>>>. These are also known as the conflict markers. The two conflicting blocks themselves are divided by a =======.
Mercurial uses similar wording
At this point, what happens depends on how Mercurial is configured (see MergeToolConfiguration). Per default, Mercurial inserts a set of markers into the files to be merged in your working copy:
Non-distributed systems? Subversion uses “confict markers”
The strings of less-than signs, equal signs, and greater-than signs are conflict markers, and are not part of the actual data in conflict.
The granddaddy of them all, CVS, also calls them conflict sections
Inside a file with conflicts, there are one or more conflict sections. Each one begins with “<<<<<<<“, followed by the section as found in your local file (or the first argument to cvs checkout if you’re doing a merge), followed by “=======”, followed by the other conflicting version, followed by “>>>>>>>”.
It seems like “conflict markers” are the usual way to refer to these. Some of these docs are official and some are made by third parties, but they all use similar wording.
In complement to the accepted answer: these markers are also used by the diff3 tool, hence this particular syntax is sometimes called “diff3 conflict markers”.