M
M
Maria2017-10-31 23:13:13
git
Maria, 2017-10-31 23:13:13

Why does Git mark the deletion and re-creation of all lines of the file when saving changes?

Hello!
Please help, I have created a new repository and now when I save changes to an edited file, GIT marks as if all lines were erased and overwritten, and blank lines are added, although I only change a few characters.

spoiler
qg9yHak1TNC1Ria8n5djZA.png

Files from UNIX system, I am currently working under Windows.
Ps: I understand that it's a matter of different line endings (LF, CRLF) and have read a lot of material, but I just can't fix the problem.
Thank you very much for your attention, I will be very grateful for any help.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
aol-nnov, 2017-10-31
@aol-nnov

is this included in the "a lot of stuff" set?
I can hardly believe that after reading this book, there are some questions about the git!

S
Sergey Andreev, 2017-11-14
@DragorWW

there is a problem with line breaks, the problem may be in
1) IDE settings, you need to check through a regular editor, for example, sublime
2) the problem is in the global settings of the git git config --global core.autocrlf false
3) setting up the repository, look at what is in the file .gitattributes
so that there is no text

* text= auto 
# если он есть то заменить на * text=false

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question