How to add a “open git-bash here…” context menu to the windows explorer?

前端 未结 12 1704
谎友^
谎友^ 2020-11-29 16:15

How to add a context (aka right click) menu to the windows explorer that, when clicked, opens the git-bash console in the current explorer folder?

12条回答
  •  再見小時候
    2020-11-29 16:58

    Here are the Registry exports (*.reg files) for Git GUI and Git Bash directly from the Windows installer —Git GUI:

    Windows Registry Editor Version 5.00
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\background\shell\git_gui]
    @="Git &GUI Here"
    "Icon"="C:\\Program Files\\Git\\cmd\\git-gui.exe"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\background\shell\git_gui\command]
    @="\"C:\\Program Files\\Git\\cmd\\git-gui.exe\" \"--working-dir\" \"%v.\""
    

    Git bash:

    Windows Registry Editor Version 5.00
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\background\shell\git_shell]
    @="Git Ba&sh Here"
    "Icon"="C:\\Program Files\\Git\\git-bash.exe"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\background\shell\git_shell\command]
    @="\"C:\\Program Files\\Git\\git-bash.exe\" \"--cd=%v.\""
    

    For detail about *.reg files, see “How to add, modify, or delete registry subkeys and values by using a .reg file” from Microsoft.

提交回复
热议问题