45

I don't know, how that happened but before today I could right click on any folder and there would be and an option Git Bash here. But today I dont have that option. Anyone knows how to get that back?

peterh
  • 11,875
  • 18
  • 85
  • 108
FoxKllD
  • 971
  • 3
  • 13
  • 22
  • 1
    In case your entries get corrupted, you will rather see: `explorer.exe: Application Not Found` popup. The solution described in this question works as well for this. – Rajesh Swarnkar Jan 18 '22 at 11:04
  • FYI, if you are using Windows 11, there's a post created for that. You can track that availability there: https://stackoverflow.com/questions/70237709/how-to-add-a-git-bash-here-context-menu-option-to-the-windows-explorer-in-wind – David Oganov Apr 13 '22 at 13:18

13 Answers13

53

HOW TO FIX WITHOUT RE-Installing:

I got this problem after moving all my programs off of my main hard drive and pasting them into my "P" drive. But kept all of the directory structures the same.

Git was moved from:
C:\DEV\PROG\GIT
TO:
P:\DEV\PROG\GIT

1: Open The Registry Editor: Type "regedit" in start menu search and hit enter.

2: Find the context menu shortcut configuration for "git bash here" In regedit: Menu "Edit" > "Find" > "Find what" and enter "git_shell"

3: Edit the Data value so that path points to the correct location. In my case I changed:

"C:\DEV\PROG\GIT\git-bash.exe" "--cd=%v."
TO:
"P:\DEV\PROG\GIT\git-bash.exe" "--cd=%v."
Screen shot included below.

git_shell Data Path in RegEdit

mwfearnley
  • 3,303
  • 2
  • 34
  • 35
Juan Marco
  • 736
  • 6
  • 4
  • This is what I needed. Thank you! – Alan Sep 08 '17 at 14:50
  • to fix also the icon on the right-click contect menu perform a similar change (without "--cd=%v.") in: - git_shell --> Icon --> Edit Value Data – StefTN Sep 14 '22 at 13:17
35

Steps if you can't use the reinstall metod.

Use REGEDIT

1/ Open regedit (search it if needed)
2/ Go to 'HKEY_CURRENT_USER/Software/Classes/Directory/Background'
3/ Create new key 'shell'
4/ Create new key 'Git bash here' (or whatever name you want to see in the menu)
5/ Create new key 'command' (must be named command)

At this point point you'll have
'HKEY_CURRENT_USER/Software/Directory/Background/shell/Git bash here/command'

6/ Edit the value of the command key as follow 'pathToGit/git-bash.exe'

Update or open new windows explorer and you'll see it when right clicking.

Image to sum this up : How to add git bash here in context menu

Fundhor
  • 3,369
  • 1
  • 25
  • 47
  • I have no Directory folder – Andhi Irawan Mar 01 '18 at 03:30
  • The image was right, I forget a directory in the description. I hope you managed to make it work anyway :) @WebDever – Fundhor Mar 23 '18 at 14:11
  • True. Thanks for the update. I ended up deleting it and reinstalling git to be sure. It is working great now. Thanks @Fundhor – silvio Mar 25 '18 at 18:52
  • 6
    If you are like me and like to see the icon you can do this. add this value to the "Git bash here" key. New -> String Value -> Name = Icon -> Data = C:\Program Files\Git\git-bash.exe – Jonathas Sucupira Jul 23 '19 at 21:03
  • 3
    Adding --cd=%v to the command will select the current directory you are running this from contextually. I combined this answer with Paul's below. – feyd Sep 29 '20 at 11:57
  • You can use below commands to locate `git-bash.exe`: `where git-bash`. Thank me by upvote. – Rajesh Swarnkar Jan 18 '22 at 10:54
31

Reinstall Git and select:

Context menu entries: "Git Bash Here" (and the "Git GUI Here" option)

During the installation. Can't say why it disappeared, but this should bring it back.

Andrew T
  • 844
  • 9
  • 16
  • This only makes the gui version work for me. If from the gui I then choose git bash it reverts to the home directory again. I'm gonna file this under "Windows...". – MSpreij Jul 22 '21 at 08:42
  • That option is not available – Michael Li Jul 25 '21 at 03:16
  • 1
    Encountered the same issue of missing "Git Bash here" option from the Windows context menu. Took a close look into Windows' installed programs list, and noticed that my old version of Git has been automatically replaced with a recent version of Git, presumably by the courtesy from Windows Live Update. It must be its silent upgrade leaving out all the customized options. So, the solution is to delete the current crippled installation, and reinstall Git manually, with manual selection of "Git Bash Here" features. – RayLuo Aug 31 '21 at 21:01
  • This should work. Also try to open the git installer as administrator otherwise it gives an error after installation about permissions and it causes problems with "git bash here". – fatihgonen Feb 17 '23 at 14:29
5

Run this script (AddGitToExplorerContextMenu.reg). You may need to update the location of Git. You can add it manually through regedit also

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\Background\shell\git_shell]
@="Git Bash"

[HKEY_CLASSES_ROOT\Directory\Background\shell\git_shell\command]
@="\"C:\\Program Files\\Git\\git-bash.exe\" \"--cd=%v.\""
Jersey
  • 151
  • 1
  • 7
  • This is not adding an icon to the shorthand. Here is full working answear from different question. https://stackoverflow.com/a/44019893/7558946 – Mieszczańczyk S. Dec 22 '20 at 16:17
5

Had the same issue , realized that previously right clicking anywhere or inside the folder the Option would show but now I had to select or highlight the folder and then right_click for the option to show.

vus
  • 81
  • 1
  • 5
  • This does not really answer the question. If you have a different question, you can ask it by clicking [Ask Question](https://stackoverflow.com/questions/ask). To get notified when this question gets new answers, you can [follow this question](https://meta.stackexchange.com/q/345661). Once you have enough [reputation](https://stackoverflow.com/help/whats-reputation), you can also [add a bounty](https://stackoverflow.com/help/privileges/set-bounties) to draw more attention to this question. - [From Review](/review/late-answers/31041748) – Gerald Zehetner Feb 16 '22 at 15:23
3
  1. Uninstall Git completely and delete the Git folder in program files.
  2. Install Git.
  3. From the Context menu, select "Git Bash" & "Git GUI here" options.
N1K0
  • 31
  • 1
  • After several reinstalls, restarts, `regsvr32 /u git_shell_ext64.dll` commands this suggestion was the solution for me (I used git 1.8.3 and forgot the `git-cheetah` plugin). Thx mate. – rlegendi Jan 07 '14 at 09:55
1

I found what I was looking for was in the left pane, not in the right folder. And still using the right-click.

jim dif
  • 641
  • 1
  • 8
  • 17
1

Press SHIFT+F10. It will appear

Swapnil
  • 11
  • 1
1

if you can not find it even in the "show more option".

Just download the git bash and install it again, it will not install many things because you already have gitbash on your computer (if there is one).

It is just less than a minute to download and install and it will appear again on right click.

There might be a better solution but this is just a minute so I do this every time I miss.

I lost the git bash option 2/3 times ( i guess) after the windows update and going through the internet to follow these complex things is not worth it if I can get back with just going through the installation again.

This is the windows download link:

Link

Pravin Poudel
  • 1,433
  • 3
  • 16
  • 38
0

After Windows 11 update, it got invisible. I first uninstalled the older version and installed the latest 2.35 version. it was still not visible. It is still there albeit inside another folder in the context menu that comes with a right click. By going inside any folder right-click INSIDE that folder, in German OS there is Shift + F10 combination you have it there like before. Or without this shortcut combination go inside Further option (This last) it is there.

vimal krishna
  • 2,886
  • 28
  • 22
0

It worked fine when I was using Win 10 ,after upgrading my windows to 11 it stopped working.

I solved my problem by following these simple steps.

  1. Uninstall Git completely on computer
  2. Download it here : https://git-scm.com/download/win
  3. Install it

It works fine now!!!

Matibi
  • 1
  • 1
0

Once you right click on the folder , click on 'Show More Options'.

enter image description here

Now you should be able to see all the earlier options such as 'Git Bash Here'

enter image description here

0

As simple as that : Open the desired folder/ directory where you want to open 'git bash here', hold the shift key and right click there, you will see the option in the context dropdown menu.