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. 今天写页面,将.net也使用了语义法规来判断。做法来源是.net ado.net的类型判断 Infertype。一样的原理

    做了一个封装,使页面更容易维护一些.主要是两个方法,如下所示: private void BindModule(Action<Repeater, string> bindSingRpt)  ...

  2. OpenCV 2.4.9 学习笔记(1)—— 基本功能结构

    一些关于OpenCV(2.4.9版本)的学习笔记,作为记录,以免自己忘了. 安装与配置 OpenCV的下载.安装以及在各个平台(Windows/Linux等)配置网上有很多的资料,自己就不用存了.需要 ...

  3. (二十四)linux新定时器:timefd及相关操作函数

    timerfd是Linux为用户程序提供的一个定时器接口.这个接口基于文件描述符,通过文件描述符的可读事件进行超时通知,所以能够被用于select/poll的应用场景. 一,相关操作函数 #inclu ...

  4. 查看gcc/g++默认include路径

    转自:http://gcc.gnu.org/ml/gcc-help/2007-09/msg00205.html `gcc -print-prog-name=cc1plus` -v `g++ -prin ...

  5. Linux安转jdk

    1. 创建目录 > mkdir  /opt/java > cd /opt/java 2. 下载jdk压缩包到上述目录 jdk-8u162-linux-x64.tar.gz 3. 解压缩.建 ...

  6. 如何让natTable表格支持自定义多个右键菜单

    在nebula中,官方默认提供了一个构造natTable的builder类,并且提供了一个debugInfo的默认右键菜单,但是当我们通过官方提供的builder去创建natTable,并且要添加多个 ...

  7. BootStrap容器介绍

    <!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="utf-8& ...

  8. yum安装jdk环境变量配置

    系统版本 [root@localhost ~]# cat /etc/redhat-release CentOS Linux release (Core) #安装之前先查看一下有无系统自带jdk rpm ...

  9. 通栏导航栏的制作,综合使用CSS属性,代码不超过30行

    这篇文章,小编带领大家一同做一个利用CSS技术实现的导航栏.通过这个导航栏的制作,希望大家能够对前几篇文章中学习到的CSS属性能有一个整体的认识,并能够达到灵活运用的程度. 承接文章:灵活控制块级元素 ...

  10. Guava源码学习(二)Ordering

    基于版本:Guava 22.0 Wiki:Ordering 0. Ordering简介 Guava的Ordering提供了链式风格的比较器的实现,我们可以用Ordering轻松构建复杂的比较器. 1. ...