Git提交时提示‘The file will have its original line endings in your working directory’

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 查看远程分支、本地分支、删除本地分支

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值