# 需求描述 执行 `git add` 时,提示 `git warning: LF will be replaced by CRLF` 。 这个问题是 Windows 和 Mac 下换行方式不同所导致的。 # 方案调研 ## 调研过程 Google 上面的提示文字,有两个有价值的链接: - [LF will be replaced by CRLF in git - What is that and is it important?](https://stackoverflow.com/questions/5834014/lf-will-be-replaced-by-crlf-in-git-what-is-that-and-is-it-important) - [git如何避免”warning: LF will be replaced by CRLF“提示?](https://www.zhihu.com/question/50862500) ## 入选方案 - [LF will be replaced by CRLF in git - What is that and is it important?](https://stackoverflow.com/questions/5834014/lf-will-be-replaced-by-crlf-in-git-what-is-that-and-is-it-important):编程问题解决方案,首选 StackOverflow! # 应用过程 参考上面链接里的内容,执行了下面的命令: ```bash $ git config --global core.autocrlf input ``` 先这样用着,后面再看看结果如何。 # 要点总结 无。
需求描述
执行
git add时,提示git warning: LF will be replaced by CRLF。这个问题是 Windows 和 Mac 下换行方式不同所导致的。
方案调研
调研过程
Google 上面的提示文字,有两个有价值的链接:
入选方案
应用过程
参考上面链接里的内容,执行了下面的命令:
先这样用着,后面再看看结果如何。
要点总结
无。