source tree marks all file as modified

两盒软妹~` 提交于 2019-11-30 20:19:47

问题


I started using sourceTree I have a problem when I change certain files, I noticed those are files from my views folder (MVC), sourceTree marks it as:

Modified file, 1 lines changed, 1 lines removed

and when I push it to my svn the whole file is marked as changed, as in: All the code from before my changes marked with '-' And then all the code from after my changes marked with '+' (also stuff I didnt touch)

Any solutions?


回答1:


Make sure that the config core.autocrlf is set to false, to avoid automatic eol (end of lines) conversion on all your files.

git config --global core.autocrlf false

(and re-clone your repo to see if the issue persists)

See for more "SourceTree App says uncommitted changes even for newly-cloned repository - what could be wrong?"

This sourceTree thread points out also to .gitattributes files.


The OP Asaf Maoz points to another source (in the comments), still related to eol:

the problem was in my IDE line endings settings, some files line endings was set to MAC (when I am not on MAC) and ST could not convert them properly.



来源:https://stackoverflow.com/questions/23510716/source-tree-marks-all-file-as-modified

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