Como adicionar um menu de contexto "abrir git-bash aqui ..." ao Windows Explorer?

leticiacamposs2

Leticia Campos

Posted on July 5, 2021

Como adicionar um menu de contexto "abrir git-bash aqui ..." ao Windows Explorer?

Segue tutorial:

1) Abra um novo bloco de notas (notepad) e salva o documento com o nome OpenGitBash.reg e o tipo como todos os arquivos

1

2) Cole o seguinte script dentro desse documento em branco:



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.\""


Enter fullscreen mode Exit fullscreen mode

3) Clique no arquivo 2 vezes e execute:

image

4) Feito isso será exibido a opção de "Open to GitBash" ao seu windows explorer:

image

💖 💪 🙅 🚩
leticiacamposs2
Leticia Campos

Posted on July 5, 2021

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related