如何添加一个上下文(又名右键单击)菜单到windows资源管理器,当单击时,在当前资源管理器文件夹中打开git-bash控制台?
当前回答
我在一台新的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!
其他回答
我在一台新的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!
下面是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文件添加、修改或删除注册表子键和值”。
使用Shift + F10打开选项菜单,右键单击会出现,然后点击s到git bash这里。
当你在“https://git-scm.com/downloads”中安装git-scm时,取消位于安装窗口最底部的“只显示新选项”
一定要检查
Windows资源管理器集成 Git Bash在这里 Git GUI在这里
单击Next,您就可以开始了!
什么也不做。
只要打开你的git bash终端,输入:
git update-git-for-windows
一旦更新完成,这将自动添加“Git Bash here”到您的上下文菜单。
参考这个:https://stackoverflow.com/a/65467670
推荐文章
- 为什么调用git分支——unset-upstream来修复?
- Windows git“警告:LF将被CRLF取代”,这是警告尾巴向后吗?
- git中的哈希冲突
- git可以自动在空格和制表符之间切换吗?
- Git暂存文件列表
- 如何将git配置存储为存储库的一部分?
- 如何修改GitHub拉请求?
- 如何在Github和本地删除最后n次提交?
- 我如何调试git/git-shell相关的问题?
- 错误:无法使用rebase进行拉取:您有未分阶段的更改
- Git隐藏未缓存:如何把所有未分期的变化?
- 真实的恶魔
- 如何从另一个分支获得更改
- Git:权限被拒绝(publickey)致命-无法从远程存储库读取。克隆Git存储库时
- git reflog和log有什么区别?