Windows系统中使用bat脚本启动git bash 并运行指定命令 - 懒人一键git更新

目标

双击"autoGitPull.bat",自动打开git bash,并cd到项目,逐个git pull,保留git bash窗口展示进度。

脚本

bash 复制代码
start "" "D:\Program Files\Git\git-bash.exe" -c "echo 'autoGitPull' && cd /D/Work/xx1 && pwd && git pull && cd /C/uniapp/demoProject && git pull;bash"
exit

其中,start "" "D:\xx.exe"的第一个""是空运行,防止报错找不到命令-c

另外,屁股的";bash"是强制git bash别关窗口

相关推荐
℘团子এ6 小时前
git中,项目怎么更换远程仓库连接地址
git
Yvonne爱编码8 小时前
JAVA数据结构 DAY3-List接口
java·开发语言·windows·python
南宫码农8 小时前
我的电视 - Android原生电视直播软件 完整使用教程
android·开发语言·windows·电视盒子
哈基米~南北绿豆9 小时前
虚拟机体验:在Windows/Mac上运行鸿蒙PC开发环境
windows·macos·harmonyos
言之。11 小时前
Git Hooks
git
代码AI弗森12 小时前
Git Bash 与 PowerShell:定位差异、使用场景与选择建议
开发语言·git·bash
姚华军14 小时前
在本地(Windows环境)部署LLaMa-Factory,进行模型微调步骤!!!
windows·ai·llama·llama-factory
森叶14 小时前
Git flow command error: ‘flow‘ is not a git command 问题解决
git
x***r15114 小时前
AntDM下载管理器安装步骤详解(附下载管理与断点续传教程)
windows
面对疾风叭!哈撒给15 小时前
Windows 系统安装 Mysql 8.0+
数据库·windows·mysql