warning: LF will be replaced by CRLF in xxxx. The file will have its original line endings in your working directory
The reason is that there is a problem of symbolic escape
The line break in windows is CRLF, and the line break in linux is LF, so when performing add . Prompts, solution:
git core.autocrlf configuration instructions
Formatting is a minor headache that many developers encounter when collaborating, especially in cross-platform situations. Due to editor differences or Windows programmers adding line breaks to the end of file lines in cross-platform projects, some subtle space changes can inadvertently make their way into collaborative work or submitted patches. Don't worry, some configuration options for Git will help you solve these problems.
core.autocrlf
If you're writing a program on Windows, or if you're working with someone else who programs on Windows and you're on a different system, you may run into a line-ending closing issue. This is because Windows uses two characters, carriage enter and line breaks, to end a line, while Mac and Linux only use one character for line breaks. While this is a minor issue, it can greatly disrupt cross-platform collaboration.
Git can automatically convert line ender CRLF to LF when you commit, and LF to CRLF when you check out code. Use core.autocrlf to turn this on and set it to true on Windows, so that when the code is checked out, LF will be converted to CRLF.
Configure core.autocrlf to false, that is, do not enable the automatic conversion function.
|