after doing a git difftool --dir-diff, files are modified for some reason

孤人 提交于 2019-12-11 01:48:51

问题


After doing git difftool --dir-diff, my workspace files are modified for some reason. I've been guessing that it's converting the line endings between crlf and lf etc... However, doing "git config core.autocrlf false" or "git config --global core.autocrlf false" don't make any difference. I have tried using both windiff and beyond compare as the custom diff tool but it doesn't help. This is bad since every time I view some changes in my .csproj file, the project is reloaded since it said the file has been modified externally. Any ideas?


回答1:


The only other way an automatic conversion can be declared is through .gitattributes file (see gitattributes):

  • with directives like *.txt eol=lf ("Git: Default all text files to unix line breaks") or * text=auto ("Force LF eol in git repo and working copy")
  • with content filter (smudge script)


来源:https://stackoverflow.com/questions/12701429/after-doing-a-git-difftool-dir-diff-files-are-modified-for-some-reason

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!