解決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 directory」

經過查詢後發現出現這個問題主要緣由是:git

咱們從別人github地址上經過git clone下載下來,而又想git push到咱們本身的github上,那麼就會出現上面提示的錯誤信息

此時只須要執行以下代碼:github

    git rm -r --cached .spa

    git config core.autocrlf false.net

    git add .blog

注意 這裏是有 "." 的,  ". " 表明當前目錄

參考連接:https://blog.csdn.net/liereli/article/details/80824804it

但願對你有幫助!file

相關文章
相關標籤/搜索