Force SourceTree ignores line endings in git files

There are so many posts, but still the resolution is not clear or does not work for me. The problem seems well known.

  • I checked my project on unix and the git status shows no differences. Settings here:

    bash-3.2$ git config core.autocrlf false bash-3.2$ git config core.whitespace cr-at-eol 
  • But I also like to use SourceTree (pointing to the same Unix base base via mount NFS) for some convenience. The settings for these above attributes are exactly the same. But SourceTree shows a bunch of differences in the basis of purely line outlines.

What is the direct solution for this?
Why doesn't SourceTree have settings in the user interface?

+6
source share
1 answer

Next to the diff-ui section of the SourceTree application there is a gear icon that shows the difference in the files, you can click on it and set it to show whitespace or ignore whitespace !! I worked on the Internet for many hours and finally got a response after searching for the sourceTree equivalent of the git command:

 Git version <= 1.8.3.4: git diff --ignore-space-at-eol -b -w [commit] ... Git version >= 1.8.4: git diff --ignore-space-at-eol -b -w --ignore-blank-lines [commit] ... See the options definition below: --ignore-space-at-eol Ignore changes in whitespace at EOL. -b --ignore-space-change Ignore changes in amount of whitespace. This ignores whitespace at line end, and considers all other sequences of one or more whitespace characters to be equivalent. -w --ignore-all-space Ignore whitespace when comparing lines. This ignores differences even if one line has whitespace where the other line has none. [git version 1.8.4+]--ignore-blank-lines Ignore changes whose lines are all blank. 

Screenshot

Literature:

git command equivalent

Source tree file settings

+3
source

Source: https://habr.com/ru/post/988403/


All Articles