Ho to start Git Bash profile in Windows Terminal from bat file and pass in an executable command to run #11279

Open
opened 2026-01-31 02:43:12 +00:00 by claunia · 0 comments
Owner

Originally created by @sud0bug on GitHub (Nov 4, 2020).

0

I am trying to start 2 applications (client and server of a MERN stack app) in Git Bash using command-line arguments for Windows Terminal. Below given is my command:
wt -M; new-tab -p "Git Bash" -d D:\ws\user-management\server cmd /k "npm run dev" ; split-pane -p "Git Bash" -H -d D:\ws\user-management\client cmd /k "npm run dev"
But this starts the application in windows cmd rather than in bash as I have given cmd /k. If I change the above command to wt -M; new-tab -p "Git Bash" -d D:\ws\user-management\server npm run dev it throws this error

[error 0x80070002 when launching `npm run dev']

How do I run my npm run dev from git bash itself rather than cmd

Originally created by @sud0bug on GitHub (Nov 4, 2020). 0 I am trying to start 2 applications (client and server of a MERN stack app) in Git Bash using command-line arguments for Windows Terminal. Below given is my command: `wt -M; new-tab -p "Git Bash" -d D:\ws\user-management\server cmd /k "npm run dev" ; split-pane -p "Git Bash" -H -d D:\ws\user-management\client cmd /k "npm run dev"` But this starts the application in windows cmd rather than in bash as I have given `cmd /k`. If I change the above command to `wt -M; new-tab -p "Git Bash" -d D:\ws\user-management\server npm run dev` it throws this error > [error 0x80070002 when launching `npm run dev'] How do I run my npm run dev from git bash itself rather than cmd
claunia added the Issue-QuestionNeeds-Tag-FixResolution-Answered labels 2026-01-31 02:43:12 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#11279