Re: Git checkout issue - deleting file without apparent reason
- From
Jeff King <peff@peff.net>
- Date
- May 3, 2017, 01:49 UTC
- Message-ID
- <20170503014936.emvtrb4edbvauzqc@sigill.intra.peff.net>
- In-Reply-To
- <CAK6FQHcHxwCgzGFCnV_3wvX-sVvL8cHpZH11x6ffbzxUJTTGCQ@mail.gmail.com>
On Tue, May 02, 2017 at 09:33:02PM -0400, Paul van Wichen wrote:
Show 15 quoted lines
> We are having a strange issue that we haven't been able to pin down. > Scenario: master branch and feature branch both have a specific file. > 1. Master checked out. > 2. git status show no changes / clean staging area. > 3. Checkout feature branch . > 4. git status show no changes / clean staging area. > 5. Checkout master again. > 6. git status shows that a file has been deleted (i.e. the file was > removed from the file system and the staging area shows it as > deleted). > > The file exists in both the feature branch and the master branch. As > best as we can tell, the file is identical on both commits. > The issue occurs on multiple platforms - tested on Windows and OS X. > It only occurs for 1 specific file.
Just a guess, but might there be another file in the repository whose name differs only in case? On a case-insensitive filesystem that can cause gremlins like this, because the filesystem cannot represent all of the states in the git tree.
-Peff