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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM