这是非常不直观的:
C:\python-tdl\examples\termbox>git config core.autocrlf
false
C:\python-tdl\examples\termbox>git commit termbox.py
warning: LF will be replaced by CRLF in examples/termbox/termbox.py.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in examples/termbox/termbox.py.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in examples/termbox/termbox.py.
The file will have its original line endings in your working directory.
Aborting commit due to empty commit message.
根据各种媒体的说法,core.autocrlf=false
根本不应该有换行转换。
在项目根目录中,我发现.gitattributes
以下行:
# Auto detect text files and perform LF normalization
* text=auto
如果我评论它,警告就会消失。问题 - 我怎样才能.gitattibutes
自动覆盖这个设置?