Hacker News new | ask | show | jobs
by objplant 2719 days ago
How well does git perform for usual text (not code)? I only use git for code and as far as I know it compare only whole lines, which is not very useful in a text where a paragraph has no line brakes and is about half a page long.

I write in Word as well and merging edits from collaborators with my in-the-meantime-updated document is really anoying and error-prone. I found https://www.simuldocs.com/, but haven't tried it yet.

3 comments

> How well does git perform for usual text (not code)? I only use git for code and as far as I know it compare only whole lines, which is not very useful in a text where a paragraph has no line brakes and is about half a page long.

As long as you limit your lines' lengths git is just as good for text as it is for code. Of course you're correct that using it for paragraphs without line breaks wouldn't be that great, but my question would be why would you ever do that?

There are a few tweaks you can make to gits diff so it shows changes in a line better, but it's not great.

You can also write each sentence on its own line - output will still put them in the same paragraph. But it's not as nice a reading experience of the markdown.

markdown and git can work together. I've set that each sentence gets its own line, and configured git to use wdiff instead, highlighting the changed words instead of lines.