[GIT] 解决文件clone下来就已经是modified状态

167 阅读1分钟

最新办法: 将git的版本从默认的1.8版本更新到2.5

centos升级git到2.5

修改 .gitattributes, 使其忽略图片文件的LF问题

可以将该目录下所有的 PNG 文件都设置为不进行换行符转换,以避免在 git diff 中显示为修改

* text=auto eol=lf
public/assets/*.png -text
public/assets/*.jpg -text

# Windows
*.bat text eol=crlf