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. Scala学习随笔——控制语句

    Scala只内置了为数不多的几种程序控制语句:if.while.for.try catch以及函数调用,这是因为从Scala诞生开始就包含了函数字面量,Scala内核没有定义过多的控制结构,而是可以通 ...

  2. Scala学习随笔——深入类和对象

    函数化对象(又称方程化对象)指的是所定义的类或对象不包含任何可以修改的状态. 本篇随笔就是着重记录函数化对象.定义了一个有理数类定义的几个不同版本,以介绍 Scala 类定义的几个特性:类参数和构造函 ...

  3. WritePrivateProfileString等读写.ini配置文件

    配置文件中经常用到ini文件,在VC中其函数分别为: 写入.ini文件: BOOL WritePrivateProfileString( LPCTSTR lpAppName, // INI文件中的一个 ...

  4. J.U.C并发框架源码阅读(十)ConcurrentLinkedQueue

    基于版本jdk1.7.0_80 java.util.concurrent.ConcurrentLinkedQueue 代码如下 /* * ORACLE PROPRIETARY/CONFIDENTIAL ...

  5. kuangbin系列【简单搜索】

    poj-1321棋盘问题[bfs/回溯] Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 36385   Accepted:  ...

  6. servlet多线程同步问题

    Servlet/JSP技术和ASP.PHP等相比,由于其多线程运行而具有很高的执行效率.•由于Servlet/JSP默认是以多线程模式执行的,所以,在编写代码时需要非常细致地考虑多线程的同步问题.•如 ...

  7. Manacher【p4555】 [国家集训队]最长双回文串

    题目描述 顺序和逆序读起来完全一样的串叫做回文串.比如acbca是回文串,而abc不是(abc的顺序为abc,逆序为cba,不相同). 输入长度为 n 的串 S ,求 S 的最长双回文子串 T ,即可 ...

  8. (寒假集训)洛谷 P2058 海港

    小K是一个海港的海关工作人员,每天都有许多船只到达海港,船上通常有很多来自不同国家的乘客. 小K对这些到达海港的船只非常感兴趣,他按照时间记录下了到达海港的每一艘船只情况:对于第i艘到达的船,他记录了 ...

  9. HDU 5916: Harmonic Value Description

    题目描述 The harmonic value of the permutation $p_1,p_2,\cdots p_n$ is$$\sum_{i=1}^{n-1} gcd(p_i.p_{i+1} ...

  10. 每天一个linxu命令6之jps  查看java进程的端口

    jps -- JavaVirtual Machine Process Status Tool 可以列出本机所有Java进程的pid jps [ options ] [ hostid ] 选项 -q 仅 ...