0

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?

  • 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 Answers1

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