1. 程式人生 > >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提交的時候出現The file will have its original line endings in your working directory.錯誤,後來發現 自己再提交的時候忘記輸入git add 上傳的檔案 出現了上面的錯誤,需要下面進行修改:

1 git rm -r -f --cached ./ (刪除快取)

2 git add . (新增該目錄下所有檔案)

3 git push -u origin master (這時候提交就沒問題了)

初次提交的命令
git init
git add README.md
git commit -m "first commit"
git remote add origin

[email protected]:xxxx.git
git push -u origin master