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就可以了
相關文章
- AndroidStudio Git提交程式碼報錯LF would be replaced by CRLF的解決方案AndroidGit
- [git]warning: LF will be replaced by CRLF in 解決辦法Git
- Git錯誤fatal: CRLF would be replaced by LF in xxxGit
- IDEA使用git報錯LF would be replaced by CRLF in .gitignore (moments ago)IdeaGitGo
- git add .出現錯誤LF will be replaced by CRLF in 解決辦法Git
- fatal: LF would be replaced by CRLF 問題解決
- 關於git提示“warning: LF will be replaced by CRLF”終極解答Git
- Git:warning: CALF wilL be replaced by LF in xxxx 問題解決Git
- git警告之——warning: LF will be replaced by CRLF in src/views/study/explain.vueGitViewAIVue
- warning: LF will be replaced by CRLF in ** 的原因及解決辦法
- git提交程式碼時,一直報出“fatal: LF would be replaced by CRLF in (檔名)”的異常Git
- 記錄 warning: CRLF will be replaced LF by in XXX 的解決辦法
- warning: CRLF will be replaced by LF in 出現的原因和解決辦法
- Git — 關於 LF will be replaced by CRLF 問題出現的原因以及解決方式Git
- LF will be replaced by CRLF
- 關於 LF will be replaced by CRLF 問題的解決方式
- git add 新增錯檔案 撤銷Git
- git add命令詳解Git
- git add all和git add .區別Git
- git提示檔案有修改但實際檔案無修改解決方案Git
- git報錯400的解決辦法Git
- ubuntu下git報錯fatal: The remote end hung up unexpectedly解決方案UbuntuGitREM
- LF和CRLF換行符不一致導致的Git顯示修改問題分析及解決Git
- git pull報“unable to update local ref”解決方案Git
- git add errorGitError
- vscode如何將所有檔案格式lf批次轉換為crlfVSCode
- git - git push origin master 報錯GitAST
- 撤銷git addGit
- 將檔案的行結束符由 CRLF 轉換為 LF
- 【git】Git commit時提示錯誤時 解決辦法GitMIT
- Git 教程:解密 .gitignore 檔案、合併分支、解決衝突、及 Git 幫助Git解密
- git config配置檔案詳解Git
- git報錯集Git
- git pull衝突的解決方案Git
- 安裝git-format-staged後,Sourcetree中提交程式碼報錯的解決方案GitORM
- react-native install 報錯 No git binary found in $PATH解決方法ReactGit
- eclipse 引入外部js檔案報Syntax error on token 錯解決方案EclipseJSError
- git pull遇到錯誤:error: Your local changes to the following files would be overwritten by merge:GitError