GIT add檔案報錯:git warning: LF would be replaced by CRLF 解決方案
libgit2 returned: LF would be replaced by CRLF in 'core/src/main/java/com/task/dao/TaskLogDao.java'
報錯資訊是TortoiseGit 在add檔案中操作出現的錯誤,
翻譯過來意思是:
LBGIT2返回:LF將在CROL/SRC/My/Java/COM/Tease/Daa/TaskLogDa.java中被CRLF替換。
百度了一下,這個錯誤的原因是linux的換行符和當前系統不符合,不給提交
其實這個錯誤在idea操作git的時候有時候也會出現
解決方案是:
找到當前本地的 git 工程工作空間(對於TortoiseGit 來說就是down下來的git工程根目錄),開啟隱藏的 .git 資料夾 找到 config 檔案:
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
………………
在[core]後面新增兩個配置 autocrlf = false safecrlf = false
[core]
autocrlf = false
safecrlf = false
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
……………………
儲存之後重新add就可以了
相關文章
- [git] warning: LF will be replaced by CRLF | fatal: CRLF would be replaced by LFGit
- GIT 提交錯誤 fatal: LF would be replaced by CRLFGit
- AndroidStudio Git提交程式碼報錯LF would be replaced by CRLF的解決方案AndroidGit
- [git]warning: LF will be replaced by CRLF in 解決辦法Git
- git warning: LF will be replaced by CRLF in 解決辦法Git
- Git錯誤fatal: CRLF would be replaced by LF in xxxGit
- GIT 提交異常 fatal: LF would be replaced by CRLFGit
- git add .出現錯誤LF will be replaced by CRLF in 解決辦法Git
- window下的git [GIT] warning: LF will be replaced by CRLF問題解決方法Git
- IDEA使用git報錯LF would be replaced by CRLF in .gitignore (moments ago)IdeaGitGo
- git警告LF will be replaced by CRLFGit
- fatal: LF would be replaced by CRLF 問題解決
- 關於git提示“warning: LF will be replaced by CRLF”終極解答Git
- git提交程式碼時,一直報出“fatal: LF would be replaced by CRLF in (檔名)”的異常Git
- git警告之——warning: LF will be replaced by CRLF in src/views/study/explain.vueGitViewAIVue
- warning: LF will be replaced by CRLF in ** 的原因及解決辦法
- 在Windows下使用git時出現 warning: LF will be replaced by CRLF in xxx.WindowsGit
- LF will be replaced by CRLF
- Git — 關於 LF will be replaced by CRLF 問題出現的原因以及解決方式Git
- 記錄 warning: CRLF will be replaced LF by in XXX 的解決辦法
- warning: CRLF will be replaced by LF in 出現的原因和解決辦法
- Git:warning: CALF wilL be replaced by LF in xxxx 問題解決Git
- 關於 LF will be replaced by CRLF 問題的解決方式
- 關於 LF will be replaced by CRLF 問題出現的原因以及解決方式
- git add 新增錯檔案 撤銷Git
- git錯誤:物件檔案為空(object-file-is-empty)解決方案Git物件Object
- Git不能add含有漢字檔案Git
- 理解 CRLF,LF
- git報錯400的解決辦法Git
- git提示檔案有修改但實際檔案無修改解決方案Git
- git pull報“unable to update local ref”解決方案Git
- ubuntu下git報錯fatal: The remote end hung up unexpectedly解決方案UbuntuGitREM
- git add命令詳解Git
- git add all和git add .區別Git
- git add errorGitError
- git報錯集Git
- git - git push origin master 報錯GitAST
- git 上傳專案 報錯 git pull --rebase origin masterGitAST