I have a doubt now, does Git does the CRLF conversion during a commit or during a vi
of the file?
Let’s say I have some files in Windows with CRLF (not a Git repo), when I sync these files to a UNIX Git repo and do git add/commit with autocrlf true
enabled, will these files get the conversion from CRLF to LF?
Or does it do the conversion of these files only when I vi
these files and commit it again?
The second doubt is, what should be the autocrlf
and safecrlf
setting in both Unix and Windows Git clones if my parent repository exists in Unix and need LF alone. Should I use global setting?
Thanks in advance
As mentionned in issue 449:
svn:eol-style
(just likecore.autocrl
f) is a mechanism that happens on checkout and commit.
As for the value of that setting, on both sides (Windows/Unix), I always set it to false (in a global setting), as jleedev comments on your question.
Same for safecrl
.
来源:https://stackoverflow.com/questions/3888098/does-git-does-the-crlf-lf-conversion-during-commit-or-checkoutvi