When I clone a project, I did git status
right away and some files appear edited.
I check with git diff .
and all edited files have the same message: "warning: CRLF will be replaced by LF".
I didn't even open any files.
git checkout .
didn't work.
How is this possible?
Asked
Active
Viewed 24 times
0
-
You are on a Linux machine, are you not? (It's hard to tell but you do have [tag:linux] in your tags, which isn't really appropriate here but is a clue nonetheless.) – torek May 07 '21 at 01:33
1 Answers
0
On Linux new line mark it is \n
, and on Windows it is \r\n
, so it looks like when you clone a repository, the operating system changes \r\n
to \n
and you see the difference

Vladislav Tupikin
- 114
- 6
-
-
Check this out: https://stackoverflow.com/questions/21822650/disable-git-eol-conversions – Vladislav Tupikin May 06 '21 at 15:51