1

This is a the bat file I am currently executing. It does open the git bash in a particular folder, but does not execute the gulp command on the git bash command line. How can I do that?

C: cd C:\xampp\htdocs\wordpress\wp-content\themes\gulp-dev start "" "%PROGRAMFILES%\Git\bin\sh.exe" --login

Kinder Cappy
  • 523
  • 1
  • 6
  • 16

1 Answers1

1

First, instead of C:, replace the first two lines with:

cd /d C:\xampp\htdocs\wordpress\wp-content\themes\gulp-dev

/d will change drive if necessary.

Second, add:

start /b "%cd%" "%PROGRAMFILES%\Git\bin\sh.exe" --login

Third, if you want to execute a command on shell opening:

...sh.exe" --login -i -c "my command"
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250