A
A
Anton Dyshkant2016-02-25 02:32:58
git
Anton Dyshkant, 2016-02-25 02:32:58

Git for non-programmers, or how to make git work not line by line?

Interested in the following.
There is a paragraph of text and there is a need to control versions of the text. Text split into large paragraphs
The problem is this: if the person editing the text decides to put a comma in the middle of a paragraph, the entire paragraph (which is one line) will be deleted and a new paragraph with a comma added - this is how it will look in the commit. If there are 20 sentences in a paragraph, then correcting the smallest error will result in 19 of the twenty sentences being marked as redacted, but this will not be true.
Purpose: to make (if possible) git have some other delimiter that defines "line" and not the actual line break (for example, dot, ellipsis, exclamation point, and question mark). Thus, by putting a comma, it will be possible to commit with one changed "line" - the sentence.
Do you know of a means to do this?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sergey, 2016-02-25
Protko @Fesor

do not write a paragraph in one line, do hyphens every 80 characters, for example.

P
pomeo, 2016-02-25
@pomeo

git diff --color-words=.

S
sim3x, 2016-02-25
@sim3x

Highlighting is up to the editor and version viewer - so that they can mark the specific change location.
You can also use markdown there paragraph = \n\n

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question