我不知道发生了什么事情,但在今天之前,我可以右键单击任何文件夹,并会出现一个选项 Git Bash here
。但是今天我没有这个选项。有人知道如何恢复它吗?
我不知道发生了什么事情,但在今天之前,我可以右键单击任何文件夹,并会出现一个选项 Git Bash here
。但是今天我没有这个选项。有人知道如何恢复它吗?
如何修复“无需重新安装”:
我在将所有程序从主硬盘移动到我的“P”驱动器后遇到了这个问题。但保持了所有目录结构不变。
Git已从以下位置移动:
C:\DEV\PROG\GIT
至:
P:\DEV\PROG\GIT
1:打开注册表编辑器: 在开始菜单搜索中键入“regedit”,然后按Enter。
2:查找“git bash here”的上下文菜单快捷方式配置 在regedit中:“编辑”菜单>“查找”>“查找内容”并输入“git_shell”
3:编辑数据值,使路径指向正确的位置。 在我的情况下,我更改了:
"C:\DEV\PROG\GIT\git-bash.exe" "--cd=%v."
TO:
"P:\DEV\PROG\GIT\git-bash.exe" "--cd=%v."
Screen shot included below.
如果您无法使用重新安装方法,请按以下步骤进行操作。
使用 REGEDIT
1/ Open regedit (search it if needed)
2/ Go to 'HKEY_CURRENT_USER/Software/Classes/Directory/Background'
3/ Create new key 'shell'
4/ Create new key 'Git bash here' (or whatever name you want to see in the menu)
5/ Create new key 'command' (must be named command)
At this point point you'll have
'HKEY_CURRENT_USER/Software/Directory/Background/shell/Git bash here/command'
6/ Edit the value of the command key as follow 'pathToGit/git-bash.exe'
打开或更新Windows资源管理器,右键点击即可看到它。
git-bash.exe
:where git-bash
。感谢您的支持,给我点个赞吧。 - Rajesh Swarnkar重新安装 Git 并选择:
Context menu entries: "Git Bash Here" (and the "Git GUI Here" option)
在安装过程中,不知道为什么它消失了,但是这应该可以让它恢复。
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\Background\shell\git_shell]
@="Git Bash"
[HKEY_CLASSES_ROOT\Directory\Background\shell\git_shell\command]
@="\"C:\\Program Files\\Git\\git-bash.exe\" \"--cd=%v.\""
regsvr32 /u git_shell_ext64.dll
命令后,这个建议对我来说是解决方案(我使用的是 git 1.8.3,忘记了 git-cheetah
插件)。谢谢,伙计。 - rlegendi我发现我要找的东西在左侧窗格中,而不是右侧文件夹中。并且仍然使用右键。
如果你甚至在“显示更多选项”中都找不到它。
只需下载git bash并重新安装即可,因为您的计算机上已经有了gitbash(如果有的话),所以不会安装太多东西。
下载和安装时间不到一分钟,右键单击后就会再次出现。
可能有更好的解决方案,但这只需要一分钟,所以每次我错过时都会这样做。
在Windows更新后,我大概失去了2/3次git bash选项,通过互联网跟随这些复杂的事情不值得,如果我可以通过重新安装来恢复,那就行了。
这是Windows下载链接: