warning: in the working copy of 'README.md', LF will be replaced by CRLF the next time Git touches it
时间: 2023-10-26 10:00:49 浏览: 165
这个警告是由git的自动换行转换机制引起的。根据引用的说明,当在 Windows 上设置 core.autocrlf=true时,git会在提交时将回车(CR)和换行(LF)转换为换行(LF),在检出时将换行(LF)转换为回车(CR)和换行(LF)。然而,如果在仓库里没有配置.gitattributes并且在Windows上设置core.autocrlf=false,就容易引入CRLF或混合换行符(Mixed Line Endings)到版本库,可能会导致一些奇怪的问题(引用)。为了修正这个问题,可以将core.autocrlf设置为input,这样在提交时会将回车和换行转换为换行,但在检出时不进行转换(引用)。所以,在Windows上,你可以运行以下命令来设置core.autocrlf为input以修复警告:git config --global core.autocrlf input<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* *3* [warning: in the working copy of ‘...‘, LF will be replaced by CRLF the next time Git touche](https://blog.csdn.net/weixin_55252589/article/details/129017650)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 100%"]
[ .reference_list ]
阅读全文