git problem fiction says git add error: LF will is replaced by CRLF

Source: Internet
Author: User

This article from: http://blog.csdn.net/loovejava/article/details/22114477


Recently working on the window platform, not using the command line
So I'm not familiar with a lot of orders, haha.

The following error occurred in the Home graphics tool when referring the modified code to the local git bin:
[HTML] View plaincopyprint? To see code slices that derive from my code slices
Warning:lf'll be replaced by CRLF
Fatal:crlf would is replaced by LF

Does not affect the commit code, but is disgusting, every time the same error

Later looked up the next data to find is a configuration option to modify the line, netizens also said conversion symbols, the two methods are as follows:
1. The aim is to set the CORE.AUTOCRLF to False
directly on the command
[Python] View plaincopyprint? To view code slices from my Code slice
#备注可以使用--global can also be impractical and less influential
git config--global core.autocrlf true #这个是转换, is also the default value
git config--global core.autocrlf input #貌似是上库转换, moving out of code from library does not convert
git config--global core.autocrlf false #这个一般是window上的, not converted


2. Convert the CRLF in your source file to LF "recommended by others"

In window is CRLF and on Linux (seemingly Mac, because Mac core seems to be UNIX-based) on the LF
There will be a transition
That is, when you are on the library, git Add. When you manually switch
Download it and re-convert it.
The trouble is not recommended

git problem fiction says git add error: LF will is replaced by CRLF

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.