baidu搜了很多, 没有结果.估计大家都没有这个场景.google了一下, 几篇非常不错的结果:

https://superuser.com/questions/1104567/how-can-i-find-out-the-command-line-options-for-git-bash-exe

--command=<command-line>::
Executes `<command-line>` instead of the embedded string resource --[no-]minimal-search-path::
Ensures that only `/cmd/` is added to the `PATH` instead of
`/mingw??/bin` and `/usr/bin/`, or not --[no-]needs-console::
Ensures that there is a Win32 console associated with the spawned
process, or not --[no-]hide::
Hides the console window, or not

https://github.com/git/git/commit/ac6b03cb4197311b055dc5f46ab10bf37c591ae6

git-wrapper: allow overriding the command to spawn via command-line args

By embedding string resources into the Git wrapper executable, it
can be configured to execute custom commands (after setting up the
environment in the way required for Git for Windows to work properly).
This feature is used e.g. for `git-bash.exe` which launches a Bash in
the configured terminal window. Here, we introduce command-line options to override those string
resources. That way, a user can call `git-bash.exe` (which is a copy of
the Git wrapper with `usr\bin\bash.exe --login -i` embedded as string
resource) with command-line options that will override what command is
run. ConEmu, for example, might want to call ...\git-bash.exe --needs-console --no-hide --minimal-search-path ^
--command=usr\\bin\\bash.exe --login -i In particular, the following options are supported now: --command=<command-line>::
Executes `<command-line>` instead of the embedded string resource --[no-]minimal-search-path::
Ensures that only `/cmd/` is added to the `PATH` instead of
`/mingw??/bin` and `/usr/bin/`, or not --[no-]needs-console::
Ensures that there is a Win32 console associated with the spawned
process, or not --[no-]hide::
Hides the console window, or not Helped-by: Eli Young <elyscape@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
--cd-to-home    # Change directory to home
--cd=<path> # Change directory to <path>
-i # ?
-c # Run command, but --command doesn't work/exist
usr\bin\mintty.exe --icon git-bash.exe,0 --exec "/usr/bin/bash" --login -i <other arguments>

usr\bin\mintty.exe --icon git-bash.exe,0 --window full --exec "/usr/bin/bash" --login -i -c "echo 'Hello World!'; read"

 
 

这个日本人写得也不错

https://teratail.com/questions/100262

git-bash.exe参数的更多相关文章

  1. Git:为Git Bash.exe设置默认起始目录的两种方式(start in、~/.bashrc)

    在协作开发的过程中,我们经常要进行一些项目的上传拉取操作. 在无数次不厌其烦的打开关闭 Git Bash 后,我实在忍受不了作为一个程序员还要每次都要进行如下的小白操作了 cd /d/my-proje ...

  2. 关于Idea里设置Terminal为Git/bin/bash.exe中文乱码的问题的终极解决方案

    1.这里如果设置为Git/git-bash.exe确实不会乱码,但是每次点Idea里的Terminal都会弹出一个单独的terminal窗口而非在idea子窗口里出现: 2.因此需要设置为Git/bi ...

  3. 关于Git bash 在win10重装系统情况下闪退并生成mintty.exe.stackdump文件的问题

    问题内容:在重装win10系统情况下,有可能会出现安装Git后右击Git bash会出现闪退并生成mintty.exe.stackdump文件 个人解决方案:查看网络上各位网友的意见和解决方法后,自己 ...

  4. vscode中内置集成终端显示为git(bash.exe)

    按下快捷键 ctrl+` (其中的点是esc键下英文状态的点)调出vscode集成终端,也可从菜单栏的“查看→终端”中调出,默认显示的是系统cmd: 在设置中搜索 integrated shell 将 ...

  5. 两步实现在Git Bash中用Sublime打开文件

    每次都要用鼠标点来点去才能用sublime打开文件!太不科学!今天来配置一下在Git bash中用sublime打开文件 方法 新建一个文件命名为你想要的命令,比如 subl(注意不能有后缀名),内容 ...

  6. Git Manual / Git使用手册 / Git, GitLab, Git Bash, TortoiseGit (建议全文复制到Word文档中通过导航窗格查看)

    Git使用手册 目录 1     引言 2     Git.GitLab简介 2.1      Git 2.2      GitLab 2.3      Git基本概念 3     运行环境 4    ...

  7. git 入门教程之 git bash 竟然不支持 tree 命令

    开门见山 git bash 是 Windows 用户安装 git 时默认安装的命令行工具,不仅界面漂亮功能也不错,大多数情况下可以替代 Windows 原生的 cmd 命令行. 然而,git bash ...

  8. git 常用命令使用,git bash通用命令

    git 常用命令 1.强制推送(慎用,除非你认为其他冲突等可以丢弃 或者不是很重要) git push -- force 2.创建文件等小命令 touch a // 创建一个a文件 >> ...

  9. cmder git bash 使用

    cmder 是一款 windows 下的命令集合软件,它可以集合各种系统下的命令,并且操作非常快速方便. 安装有两个版本,一个是简化版(4.27M),一个是完全版(75.7M),它们的唯一区别:完全版 ...

  10. Windows 环境下配置 git bash 的 HOME 默认路径

    0.引 在 windows 下安装 git 之后, git 默认的HOME和~路径一般都是C:\Users\用户名,每次得用命令切换到常用的Repository下,此操作重复而没有意义.为了修改默认路 ...

随机推荐

  1. 无法加载程序集XXX.dll 此程序集可能是从 Web 上下载的

    错误    13    无法加载程序集 file:///D:\Documents\Downloads\kaxaml-master\kaxaml-master\packages\Prism.4.0.0. ...

  2. VASP学习笔记--简单的VASP运行实例:CrI3做非磁的优化

    一.总体思路 1)写入INCAR: 2)写入POSCAR,就是坐标文件: 3)写入KPOINTS文件,就是K点的选择: 4)写入POTCAR,写入POTCAR(找到势文件,然后按照POSCAR中的元素 ...

  3. HTML和JS完成页面点击四个角弹出管理页面

    实现方法1: HTML代码: <div class="top-left-corner"></div> <div class="top-rig ...

  4. 网站模板-Layui:Layui

    ylbtech-网站模板-Layui:百科 layui,是一款采用自身模块规范编写的前端 UI 框架,遵循原生 HTML/CSS/JS 的书写与组织形式,门槛极低,拿来即用.其外在极简,却又不失饱满的 ...

  5. mysql 5.5 安装教程

    (转自:https://www.cnblogs.com/solargen/p/6835399.html) 1. 官网下载mysql5.5 下载地址: http://dev.mysql.com/down ...

  6. 初学单片机:Proteus介绍、Proteus与Keil联调(Windows10环境下)

    Proteus是一个仿真软件,可以在里面设计电路并模拟测试,也可生成PCB的布线等等,反正就是强大的不行.初学单片机,除了开发板,这个仿真器就是一个很好的调式环境.软件安装信息: Proteus 8. ...

  7. C# Console.WriteLine堵塞进程

    最近在项目中控制台为了调试使用Console.WriteLine(),发现在高并发的情况下会出现假锁状态,断点调试发现卡在Console.WriteLine那.需要进行一个键盘输入才可以继续. 关于C ...

  8. ARTS-3

    ARTS的初衷 Algorithm:主要是为了编程训练和学习.每周至少做一个 leetcode 的算法题(先从Easy开始,然后再Medium,最后才Hard).进行编程训练,如果不训练你看再多的算法 ...

  9. & 和 && 区别和联系,| 和 || 区别和联系

    & 和 && 区别和联系,| 和 || 区别和联系,实际项目中,什么情况用哪种? 首先,& 和 && 的联系(共同点): & 和 &&a ...

  10. keystone验证安装

     以管理员的身份来请求鉴权的标识 keystone --os-tenant-name admin --os-username admin --os-password 123456 --os-auth- ...