給 Android Studio (Windows) 用的預設 .gitattributes

Android Studio 建立新專案的時候並沒有預設的 .gitattributes,Project 裡面有些預設檔案的 EOL 是 LF,在 Windows 環境下當 git 設定 core.autocrlf true 且 core.safecrlf true 的時候,直接做 git add 操作的話會跳出 fatal error,因此要稍微補充一下設定。

.gitattributes

* text=auto !eol

gradlew			text eol=lf
.idea/*.xml		text eol=lf
分類: 軟體開發,標籤: 。這篇內容的永久連結