Search code examples
gitgit-clone

Files showing as modified directly after a 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 repository, git status shows several files as changed. Note: I haven't opened the repository 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.

I'm on a Mac, and there are no submodules in the repository itself.

The filesystem is "Journaled HFS+" filesystem on the Mac and is not case-sensitive. The files are one-line and about 79 KB 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 repository on it.

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


Solution

  • 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.