문제

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?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top