如何添加一个上下文(又名右键单击)菜单到windows资源管理器,当单击时,在当前资源管理器文件夹中打开git-bash控制台?


当前回答

对我有用的几乎是这个,但有以下REGEDIT路径: HKEY_LOCAL_MACHINE/SOFTWARE/Classes/Directory/background/shell,在这里我创建了密钥Bash,值是我想要显示的名称,然后在这个命名命令下创建了另一个密钥,值作为git-bash.exe的路径

我在Windows 10上安装了一个新的git,由于某种原因没有自动添加这个(git版本2.12.0 64bit)

其他回答

你可以为windows安装git或为windows安装Github,两者都让你在安装时选择将此功能添加到windows资源管理器中。你可以在这里找到它:

Github for Windows

https://windows.github.com/

Git for Windows

http://git-scm.com/

下面是Registry导出(*。reg文件)Git GUI和Git Bash直接从Windows安装程序-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.\""

去抨击:

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

关于*的详细信息。reg文件,请参阅微软的“如何使用.reg文件添加、修改或删除注册表子键和值”。

我在一台新的Windows 10 Pro公司笔记本电脑上安装git -2.38.1-64位时遇到了这个问题。

我尝试了几种方法……并考虑了一个regedit脚本(道德上相当于“护士-电锯!”)…但是通过简单地卸载和重新安装Git(作为“Admin”)解决了这个问题。

具体地说:

Control Panel > Programs/Features > Uninstall Git Reboot Windows Reinstall Git-2.38.1-64-bit as "Admin" Carefull check all the options, especially: "Windows Explorer Integration: Git Bash Here, Git GUI Here <= These are checked by default ... and I'm sure they were both "Y" on the initial install I copied my .gitconfig ("C:\Users\USERNAME.gitconfig") from another PC <= I don't believe this was "essential" ...but I thought I'd mention it... Browse to a local Git repo and verify the Git context menus work <= Success after reinstall!

当你在“https://git-scm.com/downloads”中安装git-scm时,取消位于安装窗口最底部的“只显示新选项”

一定要检查

Windows资源管理器集成 Git Bash在这里 Git GUI在这里

单击Next,您就可以开始了!

对我有用的几乎是这个,但有以下REGEDIT路径: HKEY_LOCAL_MACHINE/SOFTWARE/Classes/Directory/background/shell,在这里我创建了密钥Bash,值是我想要显示的名称,然后在这个命名命令下创建了另一个密钥,值作为git-bash.exe的路径

我在Windows 10上安装了一个新的git,由于某种原因没有自动添加这个(git版本2.12.0 64bit)