A remote git repository is just cloned to a local box using Atlassian SourceTree. Even no files have really been modified in the work tree, Atlassian lists
Normally this line in .gitattribute
:
* text=auto
automatically ensures that all files that Git considers to be text will have normalized (LF) line endings in the repository, even when git config core.autocrlf
is set to false
(default). Therefore Git automatically changes the files according to these rules.
So you've the following possibilities:
assume the normalization changes are correct (as far they're done to the text files) and simply commit them, e.g.
$ git diff
$ git commit -m "Introduce end-of-line normalization" -a
remove/disable auto normalization from the .gitattribute
file and reset the files,
remove the index and re-scan the files, e.g.
$ rm -v .git/index # Or: git rm --cached -r .
$ git reset --hard # Rewrite the Git index. Or: git add -u
alternatively, whatever you do, try with force (-f
), e.g. git pull origin -f
, git checkout master -f
, etc.,
git
command-line instead, since it could be a problem with SourceTree App it-self.See: Dealing with line endings at GitHub docs.