문제

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.

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top