如何从DOS命令行启动的Git Bash的? [英] How To Launch Git Bash from DOS Command Line?

查看:3237
本文介绍了如何从DOS命令行启动的Git Bash的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有什么,我希望是一个简单的问题,但我一直没能找到答案。我想从DOS批处理文件中启动的Git猛砸。以下是我试过到目前为止:

I've got what I'm hoping is a simple question, but I haven't been able to find the answer yet. I would like to launch Git Bash from a DOS batch file. Here is what I tried so far:

1)推出的Git的Bash从Win 7的开始按钮
 2)用于识别过程为sh.exe
 3)使用批处理文件中启动sh.exe启动命令

1) Launched Git Bash from Win 7 Start button 2) Used to identify the process as "sh.exe" 3) Launched sh.exe from batch file using start command

start sh.exe

不过,这并没有推出完整的Git Bash的环境。混帐击通常有MINGW32在标题栏,但sh.exe有一个完整的路径...混帐\\ BIN \\ sh.exe。这种感觉对我来说,有一些重叠或依赖性,我是不知道的可能,这也需要加载(拉?进口?)。

However, this does not launch the full Git Bash environment. Git Bash usually has "MINGW32" in the title bar, but sh.exe has a full path to ... Git\bin\sh.exe. It feels to me like there are some overlays or dependencies that I'm not aware of possibly, that also need to be loaded (pulled in? imported?).

这是我通过谷歌搜索找到前的结果之一,但它没有完整意义上的我,我不知道它是否适用确切地我的情况:

This was one of the top results I found through Googling, but it doesn't make complete sense to me and I'm not sure if it applies exactly to my situation:

<一个href=\"http://stackoverflow.com/questions/6127063/running-git-from-windows-cmd-line-where-are-key-files\">Running如果是关键文件

我在DOS批处理脚本世界约7岁,所以要温柔。

I'm about 7-years-old in the world of DOS batch scripting, so be gentle.

任何帮助是AP preciated。先谢谢了。

Any help is appreciated. Thanks in advance.

推荐答案

如果你想从一个批处理文件启动:

if you want to launch from a batch file:


  • 64

  • x64

start "" "%SYSTEMDRIVE%\Program Files (x86)\Git\bin\sh.exe" --login


  • 86

  • x86

    start "" "%ProgramFiles%\Git\bin\sh.exe" --login
    


  • 这篇关于如何从DOS命令行启动的Git Bash的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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