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

后端 未结 5 2136
独厮守ぢ
独厮守ぢ 2020-12-04 14:23

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

5条回答
  •  余生分开走
    2020-12-04 15:10

    I still don't understand it 100%, but for us the issue was the * text=auto in the .gitattribute file in the repository. I checked, and we for sure have core.autocrlf=true set in every place it can be set for my user on a Windows PC. I knew it wasn't a SourceTree issue either, as TortoiseGit and just Windows Git (msysgit) all had the same "issue" for this repository. Really odd behavior - I would clone the repo one time and immediately see 11 "different" files, then I would delete and start over and the next clone would have 14 "different" files.

    Commenting out the * text=auto in the .gitattribute file of the repository fixed everything. Its almost like text=auto does not behave the same as autocrlf=true and the latter is disabled if the first is set in the .gitattribute file. But that is not what every guide online seems to indicate.

提交回复
热议问题