CMD命令"混帐击这里" [英] CMD Command for "Git Bash Here"

查看:147
本文介绍了CMD命令"混帐击这里"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Windows中,我可以通过打开右键菜单在当前目录下运行混帐击这里。

我要放置在gitbashhere.bat默认路径命令已得到标准cmd窗口方便地访问。

sh.exe --login -i 命令只打开的Git的bash在sh.exe的目录,而不是当前目录。

我如何检查什么命令,势必混帐击这里?


解决方案

如何检查什么命令,势必混帐击这里?


  1. 使用打开注册表编辑器 REGEDT32 注册表编辑器


  2. 菜单编辑>查找>查找内容中输入git_shell


  3. 检查返回的注册表项。


  4. 一个将是:

      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"?

  1. Open the Registry Editor using regedt32 or regedit.

  2. Menu "Edit" > "Find" > "Find what" and enter "git_shell"

  3. Examine the returned Registry entries.

  4. 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 installed git.

    You can see it runs something similar to the following command:

    pushd "%1" && "C:\git_install_dir\bin\sh.exe" --login -i
    

这篇关于CMD命令"混帐击这里"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆