3

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?

Josh Lee
  • 171,072
  • 38
  • 269
  • 275
Simon
  • 2,329
  • 4
  • 30
  • 49
  • 2
    http://stackoverflow.com/questions/5587626/git-merging-within-a-line http://unix.stackexchange.com/questions/20021/merge-that-works-at-word-granularity-instead-of-line – Josh Lee Oct 17 '12 at 20:39

1 Answers1

1

Git compare line by line.

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

git diff --word-diff-regex=.
Simon Boudrias
  • 42,953
  • 16
  • 99
  • 134