在windows下面裝git,autocrlf的值預設是true,表示clone下來的代碼行尾自動轉換為CRLF,也就是windows預設的行尾模式
可以通過下面配置,使clone不變,commit時把所有CRLF變為LF
git config --global core.autocrlf input
這麼做,在windows/linux/mac上就都一緻了
但是行尾以LF結束,用記事本打開檔案,不太友好,可以用notepad++打開檔案
在windows下面裝git,autocrlf的值預設是true,表示clone下來的代碼行尾自動轉換為CRLF,也就是windows預設的行尾模式
可以通過下面配置,使clone不變,commit時把所有CRLF變為LF
git config --global core.autocrlf input
這麼做,在windows/linux/mac上就都一緻了
但是行尾以LF結束,用記事本打開檔案,不太友好,可以用notepad++打開檔案