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 -vv

 

git如何切换分支

 

Git checkout branch_name

 

 

 

参考链接:
Git学习笔记

1 查看远程分支

  $ git branch -a

 

  2 查看本地分支

  $ git branch

3 创建分支

 

  $ git branch test

 4 切换分支到test

  $ git checkout test

 

5 删除本地分支 git branch -d xxxxx

 
 

$ git branch -d test

 

6 查看本地和远程分支 -a。前面带*号的代表你当前工作目录所处的分支

    $ git branch -a

来自:git 查看远程分支、本地分支、删除本地分支

Git提交时提示‘The file will have its original line endings in your working directory’的更多相关文章

  1. git 提交报错 : The file will have its original line endings in your working directory.

    报错现象 git  add . 的时候发现此报错 报错分析 看情况应该是不同系统对换行的识别不到位导致的 就常识来说文件是在windows下生成的所以换行和 linux 确实不同可能是因为这个导致的 ...

  2. windows10下git报错warning: LF will be replaced by CRLF in readme.txt. The file will have its original line endings in your working directory.

    window10下使用git时 报错如下: $ git add readme.txtwarning: LF will be replaced by CRLF in readme.txt.The fil ...

  3. [Git add . ] 遇到The file will have its original line endings in your working directory 解决办法

    1.在新项目中使用[ git add . ]时出现: warning: LF will be replaced by CRLF in ...... The file will have its ori ...

  4. 解决git报错“The file will have its original line endings in your working directory”的方法

    在执行命令 git commit --all -m  '说明' 时报错“The file will have its original line endings in your working dir ...

  5. git出现“The file will have its original line endings in your working directory”错误

    一.现象: git add *时出现如下现象: The file will have its original line endings in your working directory 解决: G ...

  6. The file will have its original line endings in your working directory.

    在空仓库的情况下,add,出现一下问题 The file will have its original line endings in your working directory. 当报这个警告时是 ...

  7. 解决使用git出现 The file will have its original line endings in your working directory

    执行以下命令即可解决 git rm -r --cached . git config core.autocrlf false git add . . 代表当前目录

  8. 解决 The file will have its original line endings in your working directory

    首先出现这个问题主要原因是:我们从别人github地址上通过git clone下载下来,而又想git push到我们自己的github上,那么就会出现上面提示的错误信息 此时需要执行如下代码: git ...

  9. warning: LF will be replaced by CRLF in ***. The file will have its original line endings in your working directory.

    git config --global core.autocrlf false

随机推荐

  1. wp检测是否是手机网络还是wifi网络

    原文发布时间为:2013-06-22 -- 来源于本人的百度文章 [由搬家工具导入] ),newNameResolutionCallback(handle =>{NetworkInterface ...

  2. Xcode_Build_Setting_Reference

    http://download.csdn.net/detail/xinlingdedahai/8350631 https://developer.apple.com/library/ios/docum ...

  3. ubuntu14.04LTS openssh-server 手动安装配置步骤

    先用能上网的机器下载:zlib-1.2.5.tar.bz2.openssh-5.6p1.tar.gz.openssl-0.9.8o.tar.tar,接下来,准备安装. 步骤如下: 1.首先解压安装zl ...

  4. django视图重定向

    # 原创,转载请留言联系 当请求访问到某个视图时,我们想让它重定向到其他页面,应该怎么做呢? 1.HttpResponseRedirect 需求:当我们访问127.0.0.1/my_redirect时 ...

  5. vue.js基本使用

    #原创,转载请留言联系 什么是vue.js Vue.js(读音 /vjuː/, 类似于 view) 是一套构建用户界面的渐进式框架. Vue 只关注视图层, 采用自底向上增量开发的设计. Vue 的目 ...

  6. Visual Studio 2013下我常用的两个插件

    随手记一下,我比较常用的两个插件,抛砖引玉. 代码高亮显示:SelectionHighlight.vsix 虚线插件:Indent Guides.vsix

  7. Android_html5交互 弹框localstorage 存值 整体案例

    经历2周多的时间 终于是完成了还算可以的android 整体案例了,分享下给大家  也希望自己有时间回过头来看看当初研究android的纠结心情.痛苦的经历是开发android 大部分都是在网上找解决 ...

  8. 在C#中将数字转换成中文

    上篇我们讲了在MSSQL中将数字转换成中文,这篇我们讲讲在C#中将数字转换成中文 下篇将讲一下如何将金额转换成中文金额,废话不多说,具体代码如下: /// <summary> /// 数字 ...

  9. php的一些语法

    命名空间: 一个类为App/Http/Controllers/Controller,则该类的命名空间为App/Http/Controllers,可以通过use关键字导入该类,也可以导入命名空间,但是该 ...

  10. layout layout_alignLeft跟layout_toLeftOf

    今天调布局的时候 想把界面做成横屏竖屏都可以的 突然发现之前理解的android:布局参数都是有问题的 今天贴出来 下次自己也记得 以下大部为用在RelativeLayout中的一些参数: andro ...