zdiff3
Just use diff3. Really, right now go to your terminal and type git config --global merge.conflictStyle zdiff3
what is it
Its a conflict resoultion style, it shows you the commo.. ok just look here:
If you don’t konw what your looking at, go read another post.
<<<<<<< HEADconst title = "hi"=======const title = "hello world">>>>>>> theirszdiff3 adds a new line, feel the difference yet?
<<<<<<< HEADconst title = "hi"||||||| 3960d3dconst title = "old title"=======const title = "hello world">>>>>>> theirswhats great about zdiff3 and why i cant understand why its not the default setting, is that it allows you to clearly see the intent behind the other party’s change. in case of a title you might not give a shit, but consolidating a type, updating contract, or adding feature.
concept
diff command gives you a collection of changes called hunks.
Comparing two identical files yields one sequence of common lines and no hunks, because no lines differ. Comparing two entirely different files yields no common lines and one large hunk that contains all lines of both files gnu
git is sequential, tree like, but conflicts may still occure. For example, you pull changes on edited branch.