Sam Elliott Sam Elliott - 1 month ago 8
Git Question

Files showing as modified directly after git clone

I'm having an issue with a repository at the moment, and though my git-fu is usually good, I can't seem to solve this issue.

When I clone this repository, then cd into the repo, git-status shows several files as changed. Note: I haven't opened the repo in any editor or anything.

I tried following this guide: http://help.github.com/dealing-with-lineendings/ but this didn't help at all with my issue.

I have tried

git checkout -- .
many times but it seems not to do anything.

Any help/ideas would be greatly appreciated

Update 1: I'm on a mac, and there are no submodules in the repo itself.

Update 2: the filesystem is "Journaled HFS+" filesystem on the mac, and is not case-sensitive. The files are one-line and about 79K each (yes, you heard right) so looking at
git diff
isn't particularly helpful. I have heard about doing
git config --global core.trustctime false
which might help, which i will try when i get back to the computer with the repo on it.

Update 3: changed details of filesystem with facts! and, I tried the
git config --global core.trustctime false
trick which didn't work very well.

Answer

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.