git commit时出现的问题The file will have its original line endings in your working directory
2017-02-14 11:49
567 查看
我最近使用了新的代码托管工具,把之前在oschina上的代码迁移到coding.net上去。提交代码时有一个文件提交失败。
错误信息是
LF will be replaced by CRLF in git -the file will have its original line endings,The file will have its original line endings in your working directory.
查资料发现这是windows和mac系统的换行符不同导致的问题。windows使用CRLF 也就是回车换行,而mac使用LF单个换行。git默认支持LF。windows commit代码时git会把CRLF转LF,update代码时LF换CRLF。所以windows会有默认 core.autocrlf true 。Mac 用户commit,update都用LF 所以 core.autocrlf input。
废话少说,怎么commit代码?
简单,把报错的文件删了重新建相同文件粘贴代码就ok了
错误信息是
LF will be replaced by CRLF in git -the file will have its original line endings,The file will have its original line endings in your working directory.
查资料发现这是windows和mac系统的换行符不同导致的问题。windows使用CRLF 也就是回车换行,而mac使用LF单个换行。git默认支持LF。windows commit代码时git会把CRLF转LF,update代码时LF换CRLF。所以windows会有默认 core.autocrlf true 。Mac 用户commit,update都用LF 所以 core.autocrlf input。
废话少说,怎么commit代码?
简单,把报错的文件删了重新建相同文件粘贴代码就ok了
相关文章推荐
- Git提交时提示‘The file will have its original line endings in your working directory’
- The file will have its original line endings in your working directory.
- The file will have its original line endings in your working directory.
- The file will have its original line endings in your working directory
- git commit遇到的问题:The file will have its original line ...(亲测可用)
- warning: LF will be replaced by CRLF in package-lock.json. The file will have its original line endi
- Git出现error: Your local changes to the following files would be overwritten by merge: ... Please, commit your changes or stash them before you can merge.的问题解决(Git代码冲突)
- Git出现error: Your local changes to the following files would be overwritten by merge: ... Please, commit your changes or stash them before you can merge.的问题解决(Git代码冲突)
- 奇葩问题:This file could not be checked in because the original version of the file on the server was moved or deleted. A new version of this file has been saved to the server, but your check-in comments were not saved
- git下拉项目出现的问题:E325: ATTENTION Found a swap file by the name “.git/.COMMIT_EDITMSG.swp”
- git tip: How to undo an uncommitted change/deletion for a specific file in your working directory
- An error occurred at line: 1 in the generated java file问题处理
- Ubuntu 中出现username is not in the sudoers file. This incident will be reported的错误
- 【iOS问题】The file “XXX.app” couldn’t be opened because you don’t have permission to view it.
- 解决The file “FWLifeApp” couldn’t be opened because you don’t have permission to view it.问题
- 【iOS问题】The file “XXX.app” couldn’t be opened because you don’t have permission to view it.
- 【iOS问题】The file “XXX.app” couldn’t be opened because you don’t have permission to view it.
- You have an error in your SQL syntax; check the manual that corresponds to your MySQL的问题
- 【iOS问题】The file “XXX.app” couldn’t be opened because you don’t have permission to view it.
- the line endings in the following file are not consistent.