Git 笔记

ERROR:

改了sh文件换行符从Windows提交到Git时报了这个错:

warning: LF will be replaced by CRLF in tests/integration-tests/src/main/resources/hp4m-unified-installer-integration-tests.sh. The file will have its original line endings in your working directory.

SOLUTION: 

run: git config --global core.autocrlf false

DESC:

In Unix systems the end of a line is represented with a line feed (LF). In windows a line is represented with a carriage return (CR) and a line feed (LF) thus (CRLF). when you get code from git that was uploaded from a unix system they will only have an LF.

git 会自动根据提交OS系统决定换行符类型(LF/CR),所以提交代码时如果不与当前系统一致会导致上面的错误。

REFERENCE:

关于git如何处理这个

 

 

 

posted @ 2019-08-16 14:52  苏云落雪  阅读(184)  评论(0编辑  收藏  举报