How to Add Git Bash to Context Menu : A Step-by-Step Guide

add-git-bash-to-context-menu-feature-image

Encountered a missing ‘Open Git Bash’ option in the Context Menu after installing Git on Windows? Don’t worry, you’re not alone.

Learn how to troubleshoot and add this essential feature back with our step-by-step guide, ensuring a seamless Git experience on your computer.

Here are the steps which need to follow:

Step 1: On your desktop right click “New”->”Text Document” with name OpenGitBash.reg.

Step 2: Right click the file and choose “Edit”.

Step 3: Copy-paste the code below, save and close the file.

Windows Registry Editor Version 5.00
; Open files
; Default Git-Bash Location C:\Program Files\Git\git-bash.exe

[HKEY_CLASSES_ROOT\*\shell\Open Git Bash]
@="Open Git Bash"
"Icon"="C:\\Program Files\\Git\\git-bash.exe"

[HKEY_CLASSES_ROOT\*\shell\Open Git Bash\command]
@="\"C:\\Program Files\\Git\\git-bash.exe\" \"--cd=%1\""

; This will make it appear when you right click ON a folder
; The "Icon" line can be removed if you don't want the icon to appear

[HKEY_CLASSES_ROOT\Directory\shell\bash]
@="Open Git Bash"
"Icon"="C:\\Program Files\\Git\\git-bash.exe"


[HKEY_CLASSES_ROOT\Directory\shell\bash\command]
@="\"C:\\Program Files\\Git\\git-bash.exe\" \"--cd=%1\""

; This will make it appear when you right click INSIDE a folder
; The "Icon" line can be removed if you don't want the icon to appear

[HKEY_CLASSES_ROOT\Directory\Background\shell\bash]
@="Open Git Bash"
"Icon"="C:\\Program Files\\Git\\git-bash.exe"

[HKEY_CLASSES_ROOT\Directory\Background\shell\bash\command]
@="\"C:\\Program Files\\Git\\git-bash.exe\" \"--cd=%v.\""

Step 4: Execute the file by double clicking it. Remember, you need administrator permission to write to the registry.

And here is your result :

In conclusion, regaining the ‘Open Git Bash’ option in your Context Menu is a simple yet crucial step to enhance your Git experience on Windows.

By following our comprehensive guide, you’ve successfully troubleshooted and restored this essential feature, ensuring a smoother and more efficient workflow for your version control tasks.

Now, with Git Bash readily accessible, you can maximize your productivity and make the most out of your Git installations on Windows. Happy coding!

How useful was this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.

Similar articles you may like

By Sunil Pradhan

Hi there 👋 I am a front-end developer passionate about cutting-edge, semantic, pixel-perfect design. Writing helps me to understand things better.

Leave a comment

Your email address will not be published. Required fields are marked *

Exit mobile version