How does git compare files?

1.2k Views Asked by At

I'm using git with my latex files. I had few conflicts and because paragraphs are long, it's difficult to find what's the difference, so I'm curious how git compares files? Is there a way to turn on comparison char by char, if exists? For latex it would be great :) I don't like to write each sentence in new line, which is possible in latex and doesn't break the whole paragraph, but it's ugly.

When we have:

It's realy simple sentenec

and when Person#1 change it to:

It's a really simple sentenec

and simultaneously Person#2 change it to:

It's a really simple sentence.

There is a conflict and it should be resolved, because these changes are, or could be disjoint. Right?

1

There are 1 best solutions below

0
Simon Boudrias On

Git compare line by line.

If you want to compare char by char, you can do this command:

git diff --word-diff-regex=.