CMD命令"混帐击这里" [英] CMD Command for "Git Bash Here"
问题描述
在Windows中,我可以通过打开右键菜单在当前目录下运行混帐击这里。
我要放置在gitbashhere.bat默认路径命令已得到标准cmd窗口方便地访问。
的 sh.exe --login -i
命令只打开的Git的bash在sh.exe的目录,而不是当前目录。
我如何检查什么命令,势必混帐击这里?
如何检查什么命令,势必混帐击这里?
-
使用打开注册表编辑器
REGEDT32
或注册表编辑器
。 -
菜单编辑>查找>查找内容中输入git_shell
-
检查返回的注册表项。
-
一个将是:
HKEY_CLASSES_ROOT \\目录\\壳\\ git_shell \\命令
使用值:
C:\\ WINDOWS \\ Syswow64资料\\ cmd.exe的/ Cpushd将%1和安培;&安培;C:\\ git_install_dir \\ BIN \\ sh.exe - 登录-i
其中,
git_install_dir
是您已经安装目录混帐
。您可以看到它运行类似于下面的命令的内容:
pushd将%1和安培;&安培; C:\\ git_install_dir \\ BIN \\ sh.exe--login -i
In Windows I can run "Git Bash Here" in the current directory by opening right click menu.
I want to place gitbashhere.bat in default path for commands to have got easy access from standard cmd window.
The sh.exe --login -i
command only opens git bash in sh.exe's directory instead of the current directory.
How do I check what command is bound to "Git Bash Here"?
How do I check what command is bound to "Git Bash Here"?
Open the Registry Editor using
regedt32
orregedit
.Menu "Edit" > "Find" > "Find what" and enter "git_shell"
Examine the returned Registry entries.
One will be:
HKEY_CLASSES_ROOT\Directory\shell\git_shell\command
With the value:
"C:\Windows\SysWOW64\cmd.exe" /c "pushd "%1" && "C:\git_install_dir\bin\sh.exe" --login -i"
where
git_install_dir
is the directory where you have installedgit
.You can see it runs something similar to the following command:
pushd "%1" && "C:\git_install_dir\bin\sh.exe" --login -i
这篇关于CMD命令"混帐击这里"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!