351

This isn't the best programming question but lets face it, the server fault guys aren't well versed in git, so I think its more towards this audience.

I want to switch to TortoiseGit, or PortableGit in my shell, but I'm left with these annoying context-menu options.

How do I get them to go away? Do I have to write a script to uninstall them?

1

8 Answers 8

621

64-Bit Windows

From a cmd.exe window, run these commands:

cd "C:\Program Files (x86)\Git\git-cheetah"
regsvr32 /u git_shell_ext64.dll

32-Bit Windows

From a cmd.exe window, run these commands

cd "C:\Program Files\Git\git-cheetah"
regsvr32 /u git_shell_ext.dll

Windows 10

If you are on Windows 10 and the previous methods did not work try to uninstall the application and reinstall it. But be careful during the installation process unchecking Windows explorer integration

enter image description here

7
  • 10
    File is git_shell_ext64.dll for a 64bit OS like Windows 7 tends to be
    – Matt
    Commented Apr 20, 2012 at 22:03
  • 2
    For newer versions of GitExtentions, follow the instructions here Commented Jun 18, 2013 at 19:22
  • 3
    Thanks for the side note, @TheScrumMeister, although, any reader of that should also remember that GitExtensions is not git-cheetah.
    – JayC
    Commented Jul 14, 2013 at 14:50
  • 2
    I just need single menu listed as GIT>> which expands to give child menu that are currently in my right-click handler.. how can i do this ?? Commented Mar 10, 2014 at 12:23
  • 2
    I can't find any .dll files with "shell" in the name under my Git-folder. However, removing the value from regedit did work for me.
    – Liggliluff
    Commented May 29, 2018 at 19:17
96

Only this registry removal - nothing else - worked for me on Win8.1, as of recent versions:

Windows Registry Editor Version 5.00

[-HKEY_CLASSES_ROOT\Directory\background\shell\git_gui]

[-HKEY_CLASSES_ROOT\Directory\background\shell\git_shell]

[-HKEY_CLASSES_ROOT\Directory\Shell\git_gui]

[-HKEY_CLASSES_ROOT\Directory\Shell\git_shell]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\background\shell\git_gui]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\background\shell\git_shell]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell\git_gui]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell\git_shell]
7
  • 1
    On one strange case on win 7, also this was the only solution that worked. Commented Mar 30, 2016 at 5:45
  • This worked great for me on Windows 7, thank you @dfkt!
    – Jay Taylor
    Commented Jun 18, 2016 at 22:32
  • 1
    Works in Win 10. Commented Apr 13, 2017 at 17:45
  • 1
    I installed Git using Chocolatey, so a silent install occurred and enabled the shell extensions by default. This was the solution for me. Note: I could only find Reg keys for "HKEY_CLASSES_ROOT\Directory*"; the others did not appear to exist. Commented Sep 6, 2018 at 13:25
  • On win10 (and maybe others) you do not need to reboot or re-login for changes to reflect
    – Kyle
    Commented Sep 24, 2018 at 16:28
40

You can also disable single entries using CCleaner.

enter image description here

3
  • 1
    Even after disabling the context menu options in ccleaner, the context menu options are still there for me...
    – hexicle
    Commented Jan 2, 2017 at 15:27
  • @hexicle for me it worked after restarting the explorer.exe process
    – Vlad Sabev
    Commented Apr 24, 2017 at 12:30
  • 1
    Please note that CCleaner used to have a backdoor, for me, that's a big nope lasting forever Commented Oct 22, 2020 at 9:18
20

When you install msysgit there is an option for "Windows Explorer Integration" that you uncheck to not have them show up.

You can rerun the setup and uncheck the option, or uninstall and reinstall and uncheck it then.

8
  • 7
    What would you like, a marquee tag?
    – Alex Moore
    Commented Mar 17, 2010 at 4:24
  • unfortunately that wasn't an option when it was installed, so I think I'm out of luck on it. Commented Mar 17, 2010 at 4:41
  • I know it's an option on the latest version, 1.7.0.2-preview20100309. It should be the 4th setup screen, right after choosing the installation directory.
    – Alex Moore
    Commented Mar 17, 2010 at 13:18
  • @hasen Hardly the same. He will probably update msysgit at some point so why hack around the registry with changes you will probably forget about?
    – Alex Moore
    Commented Mar 18, 2010 at 1:23
  • 9
    Without uninstalling, unchecking the option gives you a warning about NOT uninstalling the option in v 1.8.0, FYI. This is 2 years after the answer so no downvote because it may not have been that way then.
    – CAD bloke
    Commented Nov 12, 2012 at 3:16
9

In Windows 10 nothing of the above did work for me. The best solution I found is to uninstall the application and reinstall it and be careful during the installation process to uncheck Windows explorer integration

remove git remove click menu options

4
  • 3
    I can confirm that the accepted answer works on Windows 10 x64.
    – ZorleQ
    Commented Sep 19, 2015 at 12:05
  • +1 This was the only thing that worked for me on one of my Windows 10 machines. That said, the accepted answer worked on another. Commented Nov 11, 2015 at 22:34
  • 1
    Same here (Win10 x64). Have to uninstall it and install again. Commented Jan 27, 2016 at 18:49
  • This is also what worked for me. (Win10 x64). Had to uninstall it and install again.
    – Tawani
    Commented Mar 7, 2017 at 19:45
7

I had a similar issue and All the above answer does not work for me, THEN Finally I found a solution in below steps.

Step 1 : Type regedit in start menu

Step 2 : Run the registry editor

Step 3 : Navigate to HKEY_CURRENT_USER\SOFTWARE\Classes\Directory\Background\shell

Step 4 : click on "shell"

Step 5 : Right click on "Git Bash Here" and choose the delete option

Cheers

1
  • 1
    This worked for me. Most probably because my git is installed for the user, rather than system-wide.
    – rafee
    Commented Sep 5, 2019 at 19:52
4

On Windows 10 64 bits you need to do both of the following:


1. Delete registry entries

HKEY_CLASSES_ROOT\Directory\background\shell\git_gui

HKEY_CLASSES_ROOT\Directory\background\shell\git_shell

HKEY_CLASSES_ROOT\Directory\Shell\git_gui

HKEY_CLASSES_ROOT\Directory\Shell\git_shell

For convenience or if you want to automate removal (for example to use after choco upgrade) you can run in Powershell (run as Admin):

New-PSDrive -Name HKCR -PSProvider Registry -Root HKEY_CLASSES_ROOT | Out-Null
Remove-Item -Path "HKCR:\Directory\shell\git_gui" -Recurse
Remove-Item -Path "HKCR:\Directory\shell\git_shell" -Recurse
Remove-Item -Path "HKCR:\Directory\Background\shell\git_gui" -Recurse
Remove-Item -Path "HKCR:\Directory\Background\shell\git_shell" -Recurse


2. Unregister the shell extensions dll to remove additional menu entries (GitExt clone..., GitExt Create New Repository, etc.):

regsvr32 /u "C:\Program Files (x86)\GitExtensions\GitExtensionsShellEx64.dll"
3

To add to what dfkt said, there's one more location that has it, for the Library Folders:

HKEY_USERS\S-1-5-21-2901758233-4091616725-3820123586-1012\Software\Classes\LibraryFolder\background\shell\git_gui
HKEY_USERS\S-1-5-21-2901758233-4091616725-3820123586-1012\Software\Classes\LibraryFolder\background\shell\git_shell

That specific number between HKEY_USERS and Software probably varies from person to person, and account to account, so make sure it's right for you.

So, the modified, complete registry removal would be:

Windows Registry Editor Version 5.00

[-HKEY_CLASSES_ROOT\Directory\background\shell\git_gui]

[-HKEY_CLASSES_ROOT\Directory\background\shell\git_shell]

[-HKEY_CLASSES_ROOT\Directory\Shell\git_gui]

[-HKEY_CLASSES_ROOT\Directory\Shell\git_shell]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\background\shell\git_gui]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\background\shell\git_shell]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell\git_gui]

[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell\git_shell]

[-HKEY_USERS\S-1-5-21-2901758233-4091616725-3820123586-1012\Software\Classes\LibraryFolder\background\shell\git_gui]

[-HKEY_USERS\S-1-5-21-2901758233-4091616725-3820123586-1012\Software\Classes\LibraryFolder\background\shell\git_shell]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.