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?

Peter Hall
  • 36,534
  • 10
  • 79
  • 144
DevelopingChris
  • 36,999
  • 27
  • 83
  • 117
  • A deleted answer from the OP [referenced this URL](http://www.howtogeek.com/howto/windows-vista/how-to-clean-up-your-messy-windows-context-menu/) as containing a solution. – halfer Feb 24 '16 at 00:02

8 Answers8

626

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

AlbertoFdzM
  • 923
  • 10
  • 23
mpmeyer
  • 6,883
  • 1
  • 15
  • 7
  • 10
    File is git_shell_ext64.dll for a 64bit OS like Windows 7 tends to be – Matt Apr 20 '12 at 22:03
  • 2
    For newer versions of GitExtentions, [follow the instructions here](https://github.com/gitextensions/gitextensions/issues/1821) – The Scrum Meister Jun 18 '13 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 Jul 14 '13 at 14:50
  • Also, shall I see if the fix worked instantly, shall I restart the process (e.g., Total Commander) or shall I restart the whole system? Thx for the clarification in advance! – rlegendi Jan 07 '14 at 09:33
  • I don't have these DLL files: git version 1.8.5.2.msysgit.0 – Vince Jan 17 '14 at 02:44
  • 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 ?? – Shankar Regmi Mar 10 '14 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 May 29 '18 at 19:17
91

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]
dfkt
  • 1,011
  • 7
  • 2
40

You can also disable single entries using CCleaner.

enter image description here

Agostino
  • 2,144
  • 5
  • 37
  • 61
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.

Alex Moore
  • 3,263
  • 1
  • 20
  • 36
  • 7
    What would you like, a marquee tag? – Alex Moore Mar 17 '10 at 04:24
  • unfortunately that wasn't an option when it was installed, so I think I'm out of luck on it. – DevelopingChris Mar 17 '10 at 04: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 Mar 17 '10 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 Mar 18 '10 at 01:23
  • @Alex: no need to manually hack registry, I'm pretty sure there are tools that can do that for you. – hasen Mar 18 '10 at 01:46
  • @hasen But now you have to install another program. Why not just update? What if that registry change has some unintended consequence down the line that screws with something important? I think we are beating a dead horse. Potato potahto, we are getting the same thing done. I prefer my way. – Alex Moore Mar 18 '10 at 02:03
  • 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 Nov 12 '12 at 03:16
  • @CADbloke It however worked for me (removing the context menu entry) despite the warning. – bastelflp Sep 03 '19 at 20:13
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

bastelflp
  • 6,818
  • 5
  • 27
  • 61
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

Lavekush Agrawal
  • 5,724
  • 6
  • 46
  • 82
  • 1
    This worked for me. Most probably because my git is installed for the user, rather than system-wide. – rafee Sep 05 '19 at 19:52
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]
F-Lambda
  • 31
  • 2
3

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"
Ioan Agopian
  • 778
  • 5
  • 9