Git提交时提示‘The file will have its original line endings in your working directory’
2017-07-05 15:42
453 查看
Git提交时提示'The file will have its original line endings in your working directory'
Git出现错误
git add -A
warning: LF will be replaced by CRLF in database/migrations/2017_07_04_10041
warning: LF will be replaced by CRLF
warning: LF will be replaced by CRLF in xxxxx
The file will have its original line endings in your working directory.
之前一直没在意,趁有空着手解决,原来是Git默认配置替换回车换行成统一的CRLF,我们只需要修改配置禁用该功能即可。
Gitshell中输入如下命令解决:
git config --global core.autocrlf false
如何查看分支
git branch -vvgit如何切换分支
Git checkout branch_name
参考链接:
Git学习笔记
1 查看远程分支
$ git branch -a 2 查看本地分支
$ git branch3 创建分支
$ git branch test
4 切换分支到test
$ git checkout test5 删除本地分支 git branch -d xxxxx
$ git branch -d test
6 查看本地和远程分支 -a。前面带*号的代表你当前工作目录所处的分支
$ git branch -a来自:git 查看远程分支、本地分支、删除本地分支
相关文章推荐
- git commit时出现的问题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.
- warning: LF will be replaced by CRLF in package-lock.json. The file will have its original line endi
- git commit遇到的问题:The file will have its original line ...(亲测可用)
- git tip: How to undo an uncommitted change/deletion for a specific file in your working directory
- Git: untrack a file in local repo only and keep it in the remote repo
- 使用用sudo时提示"### is not in the sudoers file. This incident will be reported.
- sodu时提示:XXX is not in the sudoers file. This incident will be reported
- Fedora提示 xxxis not in the sudoers file.this incident will be reported解决办法
- Fedora提示 xxxis not in the sudoers file.this incident will be reported解决办法 [转]
- mysql提示错误#42000You have an error in your SQL syntax; check the manual that corresponds
- The line endings in the following file are not consistent.
- 一般用户下执行sudo命令提示sunxi is not in the sudoers file. This incident will be reported
- 奇葩问题: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
- Chrome插件在页面上直接绑定JavaScript事件提示Refused to execute inline event handler because it violates the following Co
- scgit管理代码 .java file should not have carriage returns (DOS line endings);Please merge (or rebase) th
- A class file was not written. The project may be inconsistent, if so try refreshing this project and building it. eclipse提示错误
- django提交表单提示"You called this URL via POST, but the URL doesn't end in a slash and you have APPEND_SL