Re: Files that cannot be added to the index

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Aug 27, 2011 at 05:35:36PM +0200, seanh wrote:
> On Fri, Aug 26, 2011 at 04:12:33PM -0500, Shaun Ruffell wrote:
> > Not sure if this is your problem exactly but awhile back I ran into
> > something similar to what you describe and tracked it down to the
> > fact that my filesystem was case insensitive. i.e.
> 
> My filesystem (HFS+ on OSX Lion) is case-insensitive, yeah. I bet you're
> right, because in one repo the modified file shows up in `git status` as
> LOG.txt but in the output from `ls` it is called `Log.txt`. It's the
> same in the other repo that has the problem, the case of the filename
> that is having the problem is different in `git status` and `ls`.
> 
> Perhaps the problem might have been introduced by moving the repo from a
> case-sensitive to an insensitive filesystem? Or by originally starting
> the repo on a sensitive fs and then using git clone to clone it onto an
> insensitive one. Or, maybe at some point I committed a change to the
> case of the filename and that introduced a problem on case-insenstive
> filesystems.
> 
> Did you find a way around the problem? I guess that the repo does not
> really have any uncommitted changes, so I just want to convince `git
> status` and `git diff` of this.

I think I fixed it like this:

  git config core.ignorecase false

then backup the LOG.txt file and:

  git rm Text/Log.txt
  git rm Text/LOG.txt
  git commit

then copy the LOG.txt file back again and add and commit it. Seems to be
okay now.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]