Files showing as modified directly after a Git clone

Solution 1:

I had the same problem on the Mac after cloning a repository. It would assume all files had been changed.

After running git config --global core.autocrlf input, it was still marking all files as changed. After looking for a fix I came across .gitattributes file in the home directory which had the following.

* text=auto

I commented it out and any other cloned repositories from now on were working fine.

Solution 2:

I got it. All the other developers are on Ubuntu (I think) and thus have case-sensitive file systems. I, however, do not (as I'm on a Mac). Indeed, all the files had lowercase twins when I took a look at them using git ls-tree HEAD <path>.

I'll get one of them to sort it out.