我启动了一个新的Express目录,并运行git add .将其添加到源代码管理中。当我这样做时,我会犯以下错误:
$ express -c stylus
$ sudo npm install -d
$ git init
$ git add .
warning: CRLF will be replaced by LF in node_modules/jade/node_modules/constantinople/.gitattributes.
The file will have its original line endings in your working directory.
warning: CRLF will be replaced by LF in node_modules/jade/node_modules/constantinople/.npmignore.
The file will have its original line endings in your working directory.
warning: CRLF will be replaced by LF in node_modules/jade/node_modules/constantinople/.travis.yml.
The file will have its original line endings in your working directory.
warning: CRLF will be replaced by LF in node_modules/jade/node_modules/constantinople/LICENSE.
The file will have its original line endings in your working directory.
warning: CRLF will be replaced by LF in node_modules/jade/node_modules/constantinople/README.md.
The file will have its original line endings in your working directory.
warning: CRLF will be replaced by LF in node_modules/jade/node_modules/constantinople/index.js.
The file will have its original line endings in your working directory.
warning: CRLF will be replaced by LF in node_modules/jade/node_modules/constantinople/node_modules/uglify-js/node_modules/uglify-to-browserify/.npmignore.
The file will have its original line endings in your working directory.
warning: CRLF will be replaced by LF in node_modules/jade/node_modules/constantinople/node_modules/uglify-js/node_modules/uglify-to-browserify/.travis.yml.
The file will have its original line endings in your working directory.
warning: CRLF will be replaced by LF in node_modules/jade/node_modules/constantinople/node_modules/uglify-js/node_modules/uglify-to-browserify/LICENSE.
The file will have its original line endings in your working directory.
warning: CRLF will be replaced by LF in node_modules/jade/node_modules/constantinople/node_modules/uglify-js/node_modules/uglify-to-browserify/README.md.
The file will have its original line endings in your working directory.
warning: CRLF will be replaced by LF in node_modules/jade/node_modules/constantinople/node_modules/uglify-js/node_modules/uglify-to-browserify/index.js.
The file will have its original line endings in your working directory.
warning: CRLF will be replaced by LF in node_modules/jade/node_modules/constantinople/node_modules/uglify-js/node_modules/uglify-to-browserify/test/index.js.
The file will have its original line endings in your working directory.
warning: CRLF will be replaced by LF in node_modules/jade/node_modules/constantinople/test/index.js.
The file will have its original line endings in your working directory.我怎么能压制这些?我应该解决这个问题还是忽略它?
发布于 2014-09-04 17:58:29
这不能解决这个问题,但是看起来Jade开发人员不会解决这个问题-- https://github.com/visionmedia/jade/issues/1128。
如果他们愿意,他们可以在本地运行$ git config --global core.autocrlf input来阻止错误的产生。
https://stackoverflow.com/questions/25656985
复制相似问题