1

I have a large VS2017 solution that is stored on GitHub. In my local working copy of the repository, there are several files that are marked with the ? icon overlay which indicates that they are non-versioned files. However, these files are in the repository and are up to date. If I commit changes to other files, these files do not show up in the No Versioned list or if I create a clone of the repository from GitHub, these files have the proper icon overlay.

Any ideas why these files are shown as Not Versioned in one local repository and not another?

coder
  • 8,346
  • 16
  • 39
  • 53
tomontee
  • 11
  • 4
  • Does the case of the filename on the filesystem match the casing in the repository? – MrTux Jul 16 '18 at 22:12
  • That indeed was the issue. C++ VS2017 and Windows doesn't care about character case. Since the compiler didn't complain I didn't think to check the casing. This 20-year old VC6 product has very inconsistent file names. Some uppercase, some lowercase, and some camel case mostly limited to 8.3 file names. I have been trying to rename some of the files and I probably renamed these in file explorer rather than use the TortoiseGIT rename facility. – tomontee Jul 17 '18 at 14:35
  • Added my comment as an answer. – MrTux Aug 09 '18 at 14:11
  • Possible duplicate of [TortoiseGit overlay icon is red but all files are commited](https://stackoverflow.com/questions/47436086/tortoisegit-overlay-icon-is-red-but-all-files-are-commited) – MrTux Sep 03 '18 at 10:20

1 Answers1

2

Please make sure that the case of the filename on the filesystem match the casing in the repository.

Background

Even if Windows ignores the case in paths, Git does not (completely) - even if you enable core.ignorecase. git status indeed does ignore the case, however, if you try to get the log on a file with a different casing, the log will be empty.

Because of this in TortoiseGit 2.4.0 the icon overlays were made case sensitive. So if the overlay icon shows that the file is versioned, the log won't be empty and if the file is shown as unversioned you get an indication that something is curious.

How to fix

  • Rename the files in the filesystem (some applications might tend to delete and re-create the files with different casing) OR use the TortoiseGit rename function to fix the casing in the repository.

  • Since TortoiseGit 2.5.0 you can configure TortoiseGit to ignore the case when calculating the overlay icons again by enabling the advanced option OverlaysCaseSensitive (cf. issue #2980).

MrTux
  • 32,350
  • 30
  • 109
  • 146