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. 系统编码 python编码

    编码一直都是一个很让人头疼的问题,尤其是在python里面.花了几天时间,终于把这个问题给弄明白了. 一,什么是编码,编码过程是怎样的?常见的编码方式有哪些? 编码是从一个字符,比如'哈',到一段二进 ...

  2. 硬件-硬盘-SSD(固态硬盘):百科

    ylbtech-硬件-硬盘-SSD(固态硬盘):百科 固态驱动器(Solid State Disk或Solid State Drive,简称SSD),俗称固态硬盘,固态硬盘是用固态电子存储芯片阵列而制 ...

  3. python3 基本数据类型_2

    #!/usr/bin/python3 #以下set,dict的方法py2无法运行 #创建set 集合,使用大括号 { } 或者 set() 函数创建 #注意:创建一个空集合必须用 set() 而不是 ...

  4. 红帽学习笔记[RHCSA] 第五课[用户、权限相关]

    第五课 用户权限 查看文件的权限 [kane@localhost /]$ ll total 36 ----------. 1 root root 1751 Aug 22 20:58 ~ lrwxrwx ...

  5. vps国外节点ubuntu修改时区重启不失效

    使用了tzselect方法,但是重启后时区又恢复到初始情况了,不得行. 使用下面的方法成功了: 1.将时区修改成上海时区 cp /usr/share/zoneinfo/Asia/Shanghai /e ...

  6. C++中的析构顺序和cosnt对象

    1,当程序中存在多个对象的时候,如何确定这些对象的析构顺序? 2,单个对象创建时构造函数的调用顺序(工程经验总结): 1,调用父类的构造过程: 2,调用成员变量的构造函数(调用顺序与声明顺序相同): ...

  7. [LeetCode] 211. 添加与搜索单词 - 数据结构设计

    题目链接:https://leetcode-cn.com/problems/add-and-search-word-data-structure-design/ 题目描述: 设计一个支持以下两种操作的 ...

  8. Paper Reading_Computer Architecture

    最近(以及预感接下来的一年)会读很多很多的paper......不如开个帖子记录一下读paper心得 Computer Architecture Last level cache (llc) perf ...

  9. 如何查看Win10开机运行了多长时间 - Windows10.Pro

    原文:如何查看Win10开机运行了多长时间 - Windows10.Pro 方法一:使用Windows PowerShell命令查看 以管理员身份运行Windows PowerShell,在打开的“管 ...

  10. Optional接口简记

    @Data public class Employee { private String name; } @Data public class Company { private String nam ...