How do I bring back the icons that indicate git status in the Windows shell?

14,687

The solution to this was provided by @magicandre1981 in the comments to this question. Here is my attempt to explain the solution.

It appears that application such as Tortoise Git, Dropbox, Google Drive, etc. that present different icons in front of Windows explorer files and folders do so by creating an overlay on top of the regular icons that Windows draws. Apparently, the application registers these overlays and Windows redraws each overlay once it has finished the basic drawing of file system objects.

However, Windows imposes a limit on the number of overlays it will honor. Any number of applications can register any number of overlays with Windows. But Windows will only pick the first 15 overlays registered with it and re-draw them. The rest will be ignored.

The Windows registry maintains the order and number of overlays registered. Specifically, the key HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers has this list as seen in the picture below.

enter image description here

An explanation of this can also be found on this web page.

As can be seen Dropbox and Google Drive had already registered more than 15 overlays in total, which was why Windows never got a chance to honor the overlays registered by Tortoise Git on my machine.

I uninstalled Dropbox and Google Drive as I didn't use their sync feature much.

enter image description here

I didn't see any change so I restarted my machine. I still didn't see any change but after about 30 minutes or so of restarting my machine, the icons were restored to normal, i.e. I started seeing the Tortoise git status for my repositories just fine.

enter image description here

Share:
14,687
Water Cooler v2
Author by

Water Cooler v2

https://sathyaish.net/?c=pros https://www.youtube.com/user/Sathyaish

Updated on June 25, 2022

Comments

  • Water Cooler v2
    Water Cooler v2 almost 2 years

    In Windows explorer, the green checkie icon for repositories that are up-to-date and the red mark for those that aren't don't show anymore.

    How do I bring them back?

    Please see the pictures attached. For e.g. I do have some untracked files in the repository named Temp.

    enter image description here

    However, none of the folders have the green or red icons that display the git repository status.

    enter image description here

    They used to be there earlier. They suddenly disappeared a few weeks ago.

    I am using 64-bit Windows 7 Home Premium.

  • magicandre1981
    magicandre1981 over 7 years
    ok, nice to see that you got it working now. but remember to edit it for HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\Cu‌​rrentVersion\Explore‌​r\ShellIconOverlayId‌​entifiers to see them in 32bit applications like Visual Studio
  • Code Gorilla
    Code Gorilla about 3 years
    Rather than uninstall apps you can change the number of spaces in front of the name since the list is alphabetically sorted. So changing " OneDrive1" to "OneDrive1" bumps it down the list. Then use task manager to restart Explorer and the icons are there.