架构师_程序员_码农网

Retrieve password
Register

QQ登录

Just one step to get started

Search
View:5335|Reply: 0
打印 上一主题 下一主题

warning: LF will be replaced by CRLF in xxxx.

[Copy link]
跳转到指定楼层
owner of the building
发表于 2021-1-5 11:26:06| 看该作者回帖奖励|ReverseBrowse|Read Mode
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 symbol escaping problem

The line break character in windows is CRLF, while in linux it is LF, so there is a prompt when executing add . So there is a prompt when you execute add :


git core.autocrlf Configuration Notes

Formatting is a minor headache that many developers encounter when collaborating, especially in cross-platform situations. Due to differences in editors or Windows programmers adding carriage returns at the end of file lines in cross-platform projects, subtle space changes can inadvertently find their way into collaborative work or patch commits. Don't worry, Git has some configuration options that can help with this.

core.autocrlf

If you're writing a program on Windows, or if you're collaborating with other people who are programming on Windows while you're on another system, you may run into the end-of-line terminator problem in these cases. This is because Windows uses two characters, a carriage return and a line feed, to end a line, while Mac and Linux use only one character, the line feed. While this is a minor issue, it can greatly disrupt cross-platform collaboration.

Git can automatically convert the line terminator CRLF to LF when you commit, and LF to CRLF when you check out your code. turn this on with core.autocrlf, and if you're on Windows, set it to true so that LF is converted to CRLF when you check out your code.



Configure core.autocrlf to false, so that autoconversion is not turned on.





Previous: SQL Server use comma separated strings
Next article: NET/C# based BlockingCollection to achieve simple logging
Code Farmer network , only published in the process of practice , encountered technical difficulties , do not mislead others .
You need to log in before you can post back Log in | Register

This version of the integral rules

DISCLAIMER:
All software, programming materials or articles published by Code Farmer are limited to be used for learning and research purposes only; the above contents shall not be used for commercial or illegal purposes, otherwise, all the consequences shall be borne by the users themselves. This site information from the network, copyright dispute has nothing to do with this site. You must completely remove the above content from your computer within 24 hours of downloading. If you like the program, please support the genuine software, buy registration and get better genuine service. If there is any infringement, please contact us by email to deal with it.

Mail To:help@itsvse.com

QQ| ( ICP备14021824号-2 )|Sitemap

GMT+8, 2024-9-19 00:17

Quick ReplyBack to topBack to list