Skip to content

Instantly share code, notes, and snippets.

@tdchien
Created May 27, 2018 09:11
Show Gist options
  • Save tdchien/19bcbeae359390c465307c03936b820e to your computer and use it in GitHub Desktop.
Save tdchien/19bcbeae359390c465307c03936b820e to your computer and use it in GitHub Desktop.
Get context menu Open Git bash here on window 7
@echo off
SET gbPath=d:\programs\git\git-bash.exe
rem add it for folders
@reg add "HKEY_CLASSES_ROOT\Folder\shell\git_bash" /t REG_SZ /v "" /d "Open Git bash here" /f
@reg add "HKEY_CLASSES_ROOT\Folder\shell\git_bash" /t REG_EXPAND_SZ /v "Icon" /d "%gbPath%,0" /f
@reg add "HKEY_CLASSES_ROOT\Folder\shell\git_bash\command" /t REG_SZ /v "" /d "%gbPath%" /f
@reg add "HKEY_CLASSES_ROOT\Directory\background\shell\git_bash" /t REG_SZ /v "" /d "Open Git bash here" /f
@reg add "HKEY_CLASSES_ROOT\Directory\background\shell\git_bash" /t REG_EXPAND_SZ /v "Icon" /d "%gbPath%,0" /f
@reg add "HKEY_CLASSES_ROOT\Directory\background\shell\git_bash\command" /t REG_SZ /v "" /d "%gbPath%" /f
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment