4

I just installed Git for Window version 2.18.0 64-bit on a new Windows 10 machine (Win 10 Enterprise).

When I right-click in explorer and choose 'Git Bash Here' or 'Git Gui Here' I see an 'Application Not Found' error pop up.

enter image description here

Update

I found this answer which nearly helped me find the problem and the solution.

With regedit I was able to see that the HKEY_CURRENT_USER\Software\Classes\Directory\shell\git_shell\command was pointing to my user folder, instead of the actual location of git:

enter image description here

For "Git Bash Here", I changed the value to "C:\Program Files (x86)\Git\git-bash.exe" "--cd=%1"

Similarly for "Git GUI here", I changed the value for the HKEY_CURRENT_USER\Software\Classes\Directory\shell\git_gui\command to "C:\Program Files (x86)\Git\cmd\git-gui.exe" "--working-dir" "%1"

However, I still see the 'Application Not Found' error. Any ideas how to fix this?

Captain Whippet
  • 2,143
  • 4
  • 25
  • 34

4 Answers4

4

Delete following entries With regedit from Run Menu:

  1. HKEY_CURRENT_USER\Software\Classes\Directory\shell\git_shell
  2. HKEY_CURRENT_USER\Software\Classes\Directory\shell\git_gui

After this Reinstall application it will come .

It works for me.

Alternate option is also http://www.hoverdroids.com/errors/git/git-gui-here-and-git-bash-here-doesnt-work-resolved/

ASHWANI PANDEY
  • 151
  • 1
  • 4
  • 2
    Be sure to search for all occurrences. Just deleting it from that path didn't fix it for me. Uninstalling, deleting git_gui and git_shell from all paths in the registry then installing did. – jla Aug 26 '20 at 15:56
  • The hoverdroids link shows a completely empty page. That is why it is recommended to copy solutions into the answer, so that they don't disappear like this. – David Balažic May 29 '23 at 12:27
0

I'm not sure what caused it, but it looks like the installer put the application in the wrong place (C:\Program Files (x86)\ instead of C:\Program Files\) and set the registry paths wrong.

My solution was to completely uninstall, delete all related registry entries and then re-install. After that everything is working fine. I suspect a bug in the installer that is dependent on specific options being selected.

Captain Whippet
  • 2,143
  • 4
  • 25
  • 34
0

For Windows 10, you can go to your home drive (defined by %HOMEDRIVE% and %HOMEPATH%, e.g. H:), or just run "Git Bash" (which will go straight to your home drive.

Create a .bash_profile file with the following:

# ------------ begin of script --------------
#!/bin/bash
target_drive=$(env | grep '!C:' | cut -d: -f3 | sed 's|\\|\/|g')
if [[ "${target_drive}" != "" ]]; then
    cd "/c/${target_drive}"
fi
# ------------ end of script --------------

save it and chmod 700 .bash_profile.

Then you can go to Windows explorer and right mouse click on a folder you try to run Git-Bash, it will switch to the folder.

The example above use C:. You can tweak it so it works for all drives.

PeteC
  • 1
  • I found the root cause of the problem. Please go to regedit:Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor. Check AutoRun. In my environment it has "cd /d H:\". After deleting that AutoRun the problem is gone. You don't need to fiddle with .bash_profile. – PeteC Dec 06 '18 at 00:16
0

I had a similar but different issue while taking a tutorial course on Pluralsight and trying to set up Git on Windows. I could not run nvm use 8.11.2 in Git Bash (even running as administrator) because... who knows. It thought I did not have a default app installed for this. Luckily, the course administrator recommended using Windows CP if I ran into any "funkiness". CP was able to find a default app somewhere, apparently. Screenshot below.

Run as administrator: Git Bash vs. Windows Command Prompt

Kale
  • 413
  • 1
  • 5
  • 12