Git’s ‘HEAD’ marker

Version control presents software developers with an efficient way to again ‘version’ code which could mean storing versions of software or backing up software.

While collaborating on projects using Git, developers may get merge conflicts which occur when developers using different branches change the same part of the same file and then those branches are merged together. A merge conflict mainly identifies itself around the changed location with special markers known as conflict markers.

There’s usually two parts for the two branch cases, surrounded on the top by HEAD preceded by conflict markers (a bunch of less than signs ‘<’). Then the first case from one of the branches, separated from the other case by a bunch of equal signs. Finally the final conflict markers (which in this case are greater than signs ‘>’).

In this case HEAD , including the conflict markers shows where the conflict is located. Moreover, HEAD is also in the position which presents the original commit before the merge attempt. Thus during a normal conflict, top shows local changes while there are other merge conflicts including rebases and stashes which could have different context.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.