This isn't the best programming question but lets face it, the server fault guys aren开发者_JAVA技巧'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?
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
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]
You can also disable single entries using CCleaner.
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.
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
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
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"
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]
精彩评论