Git says the files were changed, but I did not touch them

I work on Mac OS, but so far this problem has occurred only on my MacBook Air with an SSD hard drive. I am doing a new check of several different repositories, and status shows me a long list of modified files (without touching anything). These seem to be third-party javascript and css files. This is what I read, it seems, is the end of the line, but the despot:

 git config --global core.autocrlf input 

As shown here http://help.github.com/line-endings/ , then check. Has the same problem.

Help = (

+4
source share
2 answers

Try it first:

 git config --global core.autocrlf false 

This will prevent any β€œautomatic” conversion.

See also " Distributing git configuration with code " for alternative ways to manage eols.

0
source

as indicated in another answer,

 git config --global core.autocrlf false 

If you have files that correctly save line endings as crlf, you should also suppress the "cr" selection. Git diff and other patch outputs will highlight potentially problematic spaces. You can suppress this with:

 git config --global core.whitespace cr-at-eol 

Remember that --global will make this effective for all your repositories when you log in as the same user on the machine. To apply the setting to any user, use --system . Conversely, you can only apply the setting to the current repo with --local . --local implied if the region parameter is not set.

0
source

Source: https://habr.com/ru/post/1414764/


All Articles