How to solve the problem of git bash not appearing on the right mouse click!!

Chinmay Khamkar
2 min readMay 21, 2021

Has it ever happened that the git bash command has suddenly disappeared as you right-click and immediately you have a feeling that the entire world is falling apart!! Like how are you supposed to push that production code to the master branch?!

Even I encountered this scenario and manage to find a solution for it so decided to share it with the community. The first solution is pretty easy, you reinstall git in your machine and everything should work just fine but if you want a quick fix then follow this step-by-step approach.

Step 1 — Type Regedit in the start menu to open the Registry editor.

Step 2 — On the left panel go to the following path ‘HKEY_CURRENT_USER/Software/Classes/Directory/Background’

Step 3 — Right-click on background and create a new key and name it ‘shell’

Step 4 — Similarly now right-click on the newly created shell directory and create another key with the name of ‘bash’.

Step 5 — For this bash directory, we need to set a data value that will be displayed when you right-click. For this, double click on Default which would appear on the right panel.

Step 6 — A dialog box will open where you enter ‘Open in bash’ in the value data field and press OK.

Step 7 — Again repeat step no. 4 and right-click on Bash to create another key with the name of ‘command’

Step 8 — For the command directory, repeat the procedure performed in Step no. 5. This time in the dialog box enter the path to which your git-bash.exe is pointed. For most cases the path should be something like this ‘C:\Program Files\Git\git-bash.exe.

Press OK and that’s it, you have recovered the git bash command on right-click. Screenshots for better understanding below

Any comments or feedback is appreciated.

--

--

Chinmay Khamkar
0 Followers

Fullstack developer, Interested in competitive coding and finances.