TortoiseGit not showing icon overlays

GitTortoisegit

Git Problem Overview


I have been using TortoiseGit for almost a full year now. It has been working very well for me until yesterday, when I encountered a problem. I was deleting a folder when Windows Explorer sort of crashed on me (it hung on "discovering items") for over an hour, then I restarted the system.

Since that time (and I am not sure if the incident described has anything to do with it), TortoiseGit has stopped showing icon overlays in explorer. The behaviour is, however, not like any of the others who posted questions here, because:

> In the open file dialogue of all programs, the icons still exist (!).

Here is a list of things I tried:

  1. I changed TortoiseGit settings to show different icons.
  2. Reinstall TortoiseGit (uninstall, restart, install, restart).
  3. I deleted all icon overlays starting with "Tortoise" in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer \ShellIconOverlayIdentifiers, then uninstalled TortoiseGit, restarted the computer and reinstalled TortoiseGit.

Edit:

I tried to create a new user on my computer, and the new user has icon overlays working just fine. I am now even more confused.

Nothing helped so far. Any ideas?

Git Solutions


Solution 1 - Git

I had the same problem and I got it to work by following instructions from a forum. What I did was this (copied):

> I find solution :) Wrapping with "" all tortoise keys under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers

>on 1TortoiseNormal and etc... I understood the problem, seeing as Dropbox and it worked regedit there was the sign ("") to Dropbox but not tortoise. So I added the signs, close explorer.exe and hop it was good :)

So what I did was rename the key 1TortoiseNormal to "1TortoiseNormal" etc. I have no idea why wrapping it inside a double quote makes it work again. Note that a restart of Windows Explorer is required for the changes to take effect.

The original forum is gone, but a good summary is supplied in the comments.

Solution 2 - Git

Windows will only allow up to 11 icon overlay identifiers, arranged in alphanumeric order - if there are more than 11, these icons will not be displayed.

You can run the following command in a DOS prompt:

regedit /e c:\icons.txt HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers

Then open the file C:\icons.txt. Skip the first two lines, and if 1TortoiseNormal and the other *Tortoise* values are not in the top 11 values, their icon overlays will not be shown. The solution provided by @Chi Chan is just a simple way to make 1TortoiseNormal rank higher when ordered among all the overlays, you can also rename the values by adding space(s) before 1TortoiseNormal, i.e.,

" 1TortoiseNormal"

to make them rank higher.

update: for Windows 8, the limit of icon overlays is 15.

Solution 3 - Git

Windows 10 Solution Steps;

  1. Open regedit

Path :

> HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers

  1. Remove/delete all SkyDrive/OneDrive keys. You may need to take ownership of the keys one by one and give your user full control if you receive an error while trying to delete the keys.

  2. Press Ctrl+Shift+Esc and restart "Windows Explorer" (Optionally restart computer)

  3. All git/svn overlay icons are now visible !

Solution 4 - Git

Before going nuts, just try rebooting! It worked for me ;)

Solution 5 - Git

Just add one Space(or more if needed) to first Name of Tortoise options to this regedit addersses:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers

for example:

"1TortoiseNormal"

Should change to:

" 1TortoiseNormal"

after a system reboot icons shows currectly.

Solution 6 - Git

I had installed TortoiseSVN (1.9.5) and msysgit (2.11.0) first on my Windows 10 64-bit machine. TortoiseSVN icons displayed fine.

When I installed TortoiseGit (2.3.0.0) after these two the icons wouldn't display.

I checked HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers and all looked fine. The tortoise icons were in the top 10.

What I used to fix was raised in TortoiseGit issue #692 on GitLab:

> - Open regedit.exe > - Go to HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer > - Add a new string value "Max Cached Icons" with value "2000" > > closed/restarted explorer and icons display!

Solution 7 - Git

I had this same problem today after uninstalling TortoiseSVN. I rebooted and still no luck so I just went into Control Panel, Uninstall a Program and on the TortoiseGit item I picked 'Repair' and everything is back to normal. I suspect that all of the Tortoise line of apps have some shared registry keys or something.

Solution 8 - Git

I also had my TortoiseGIT shell icons quit displaying suddenly, I don't remember exactly what led up to it but I found this and tried the registry stuff changing 1TortioiseNormal to "1TortioiseNormal" and so on. That is probably a good thing to do no matter what but icon overlays were still not working.

I am too busy for the blanket answer of "restart the computer" what that says to me is "some service process needs to be restarted but you'd never be able to find it so just restart." Nah.

I also use TortoiseSVN and those icon overlays were still working for me. I looked in my processes tab of task manager and saw I had something called TSVNCache.exe running. No sign of anything similar for git, so on a whim I went over to the applications tab and hit "New Task", entered TGITCache.exe and sure enough that process fired up. From there go back to processes, kill explorer.exe, then go back to applications -> New Task again and fire up explorer.exe.

This has worked for me twice now when my TortoiseGIT icon overlays have quit, so, maybe it will work for someone else.

Solution 9 - Git

What worked for me was to uninstall Google Drive from my computer. Not sure why yet.

Solution 10 - Git

I Agree with Chi Chan and I would like to add this as an complementary answer.

It's Dropbox Explorer icons. Here is a registry script to remove them. Save it somewhere, because they will come back!

Note, that the values change from time to time, too. Currently they have 3 spaces before the "DropboxExtXX", before they had only one.

Remove Dropbox Explorer Icons.reg
Windows Registry Editor Version 5.00

[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\   DropboxExt01]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\   DropboxExt02]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\   DropboxExt03]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\   DropboxExt04]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\   DropboxExt05]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\   DropboxExt06]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\   DropboxExt07]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\   DropboxExt08]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\   DropboxExt09]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\   DropboxExt10]

Solution 11 - Git

The problem with the leading spaces is that every time you reboot, Dropbox adds another space to its registries, and will be always one step ahead of you.

So I've scheduled a python script found on this post (by Christoph Zwerschke) to execute every time the computer boots. You also have to restart the Explorer after that.

The .bat will look like:

python iconOverlayFixer.py
taskkill /f /im explorer.exe 
start explorer.exe  

And the python script:

#/usr/bin/python3

import os
import winreg as reg

# names of all overlay icons that shall be boosted:

boost = """
    Tortoise1Normal
    Tortoise2Modified
    Tortoise3Conflict
    Tortoise4Locked
    Tortoise5ReadOnly
    Tortoise6Deleted
    Tortoise7Added
    Tortoise8Ignored
    Tortoise9Unversioned
"""

boost = set(boost.split())

with reg.OpenKey(reg.HKEY_LOCAL_MACHINE,
        r'SOFTWARE\Microsoft\Windows\CurrentVersion'
        r'\Explorer\ShellIconOverlayIdentifiers') as base:

    names = set()
    renames = []
    i = 0
    while True:
        try:
            name = reg.EnumKey(base, i)
        except OSError:
            break
        core = name.strip()
        if core in names:
            print('Delete', repr(core))
            reg.DeleteKey(base, name)
        else:
            names.add(core)
            if core in boost:
                core = ' ' + core
            if core != name:
                renames.append((name, core))
        i += 1

    if renames:
        for old_name, new_name in renames:
            print('Rename', repr(old_name), 'to', repr(new_name))
            value = reg.QueryValue(base, old_name)
            reg.CreateKey(base, new_name)
            reg.SetValue(base, new_name, reg.REG_SZ, value)
            reg.DeleteKey(base, old_name)
    else:
        print('Nothing to rename')

Solution 12 - Git

What is worked for me for Windows 10 is

  1. uninstalling TortoiseGit
  2. cleaning folders and register
  3. installing it once again
  4. rebooting the computer
  5. making random commit even not seeing the red icon

Solution 13 - Git

I noticed that overlay was managed by TortoiseSVN shell extention. This can be verified using nirsoft ShellEx View. The overlay icons disappears when I disable TortoiseSVN extensions. They apparead back when I re-enable TortoiseSVN (the blue lines in screenshot below)

enter image description here

In ShellEx View, select Options > Filter By Extension Type. Select System in dialog and clic OK. Then you should the TortoiseGit and TortoiseSVN extensions. Make sure all TortoiseSVN entries are enabled.

I hope the may be useful to anyone else.

Solution 14 - Git

Open regedit.

Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\

You will see some thing like this:

> enter image description here

The order is important, and in above example the Dropbox is above Tortoise, which is the cause of this issue.

To fix this I've add one more space charter to Tortoise. You can do what ever you like to move it to the top. So change Tortoise1Normal to Tortoise1Normal.( I suspired when I see that the Tortoise1Normal has many spaces. The guys at tortoises thought that these many spaces make them top in registry !! While dropbox guys beat them as DropBox has high order than Tortoise1Normal. )

The registry will be some thing like this: ( You need to close and reopen regiedit or press F5 to see new sorting)

> enter image description here


Finally End Task the explorer and re run it.

Solution 15 - Git

Go To "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers"

Prefix all the Tortoise*** folders with 5 White Spaces(Spacebars) - You may find Tortoise1*** to Tortoise9*** folders

Close the registry window and restart your PC.

It worked for me, i hope it works for others too.

Solution 16 - Git

  1. Exported registry file, opened in text editor and deleted leading spaces. Added exclamation (!) to front of Tortoise. Saved as Preferred-Shell-Icon-Overlay-Settings.reg
  2. Wrote batch file to delete key and subkeys then restore from *.reg file.
  3. Can run at any time, place in startup folder or write as powershell and place in task scheduler to run upon startup.

batch file:

REG DELETE HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers /F
TIMEOUT 1 > NUL
REG IMPORT "H:\GIT\Preferred-Shell-Icon-Overlay-Settings.reg"

reg file:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\!Tortoise8Ignored]
@="{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx}"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\GoogleDriveSynced]
@="{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx}"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\DropboxExt01]
@="{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx}"

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Question5xumView Question on Stackoverflow
Solution 1 - GitChi ChanView Answer on Stackoverflow
Solution 2 - GitDzhuangView Answer on Stackoverflow
Solution 3 - GitreplicantspyView Answer on Stackoverflow
Solution 4 - GitJan HettichView Answer on Stackoverflow
Solution 5 - GitAmir Hossein GhasemiView Answer on Stackoverflow
Solution 6 - Giticc97View Answer on Stackoverflow
Solution 7 - GitRichard EdwardsView Answer on Stackoverflow
Solution 8 - GitarudlangView Answer on Stackoverflow
Solution 9 - GitDarien PardinasView Answer on Stackoverflow
Solution 10 - Gitbytecode77View Answer on Stackoverflow
Solution 11 - GitmathiasfkView Answer on Stackoverflow
Solution 12 - GitRomanView Answer on Stackoverflow
Solution 13 - GitmorbacView Answer on Stackoverflow
Solution 14 - GitAlireza FattahiView Answer on Stackoverflow
Solution 15 - GitiYadavView Answer on Stackoverflow
Solution 16 - GitjmuhammadView Answer on Stackoverflow