As far as I know, git stores revisions by saving changed lines. Running text documents like documentations or wordy LaTeX files, normally have very long lines or are forcefully broken after 80 characters. When one word is changed, it leads to a huge difference in changed lines which bloats up the git repository.
Is it possible to make git work by words instead of lines? I know that there is git diff --color-words
which outputs changed words in a more pretty format. But this does not affect how these changes are internally stored.
I also know the practice to reformat the documents to make them more fit for versioning, by beginning a new line after each sentence. But this would severly clutter the format of most documents while still only shrinking the problem to a sentence length.
In other words, can I configure git to regard the space character instead of the newline character when it creates a revision?