在 Git 客戶端(如 TortoiseGit、VS Code、IntelliJ)中,藍色問號代表 **Untracked(未追蹤)**:檔案存在於工作目錄,但未加入 Git 索引(未 git add)。
warning: LF will be replaced by CRLF
Git 根據設定自動轉換換行符:
core.autocrlf=true(Windows 預設):提交時 LF→CRLF,檢出時 CRLF→LF。core.autocrlf=input:提交時 LF→CRLF,**檢出不轉換**(Linux/Mac 推薦)。core.autocrlf=false:不自動轉換,保持原樣。.gitattributes 明確指定:# .gitattributes
* text=auto # 文字檔自動轉換
*.jpg -text # 二進位檔不轉換
*.png -text
*.sh eol=lf # 強制 LF
*.bat eol=crlf # 強制 CRLF
git add .gitattributes,確保團隊一致性。# 將所有文字檔轉為 LF
git add --renormalize .
git commit -m "Normalize line endings"
core.autocrlf=true。git add 並提交;若為編譯產物、IDE 設定,加入 .gitignore。