Question

Hi sir /madam, I have git remote repository for my project work, i cloned that from system 1, edited some file called examle.java and then i added it to stag area, then commited, then push the sam to repository again.

From another system im doing push to the same repository, i could not done that, so first i pull then i see its merging files automatically, and writing some comments to the file ( these comments i dont want). how to disable these comments.

example : this is the merged file (example.java)

<<<<<<< HEAD int k;

======= int i;

//>>> 7fcbc9a0af87e764f3529cdb3ec9858441218823

i dont want these " <<<<<<< HEAD , =======, >>>>>>> 7fcbc9a0af87e764f3529cdb3ec9858441218823 " comments.

Was it helpful?

Solution

These are not comments. It means that the pull executed merge which was not fastforward. These are CONFLICTS that are to be resolved manually.

A pull will execute merge if the pulled resources were changed on both sides. If those changes only modify different lines in a given resource, the merge is fastforward and done without the need of human interaction. On the other hand, if the same lines of a resources were changed on both sides, git-merge will keep both variants, and add the conflict markers.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top