For merge conflicts in git, they appear in the file as follows:
<<<<
old
old
====
new
new
>>>>
Now I have some changes to origin/masterI'm going to merge into a local branch master. If I simply combine them normally, new lines will simply display well in the file, as there are no conflicts.
However, I want the changes to be displayed as those merge conflicts above, so I can see both the old and new lines in which the conflicts are located, surrounded by <<<<and >>>>, view each change manually and delete the material that should go.
How can I “provoke” such a conflict?
The workaround does git diff -U999999 original.txt > review.txt, but then you have to remove a lot of character -, and +at the beginning of each line when viewing the file.
source
share