How do I write a batch file which opens the GitBash shell and runs a command in the shell?

前端 未结 6 1142
南方客
南方客 2020-12-01 00:22

I\'m on Windows 7 trying to use a batch file to open the GitBash shell and make a git call. This is the contents of my batch file:

REM Open GitBash 
C:\\Wind         


        
6条回答
  •  眼角桃花
    2020-12-01 00:53

    You can also run a shell script to run multiple commands

    #! /bin/bash
    cd /c/GitRepo/PythonScripts
    git status
    read -p "Press enter to continue"
    

    then call that from your cmd line:

    "c:\Program Files (x86)\Git\bin\sh.exe" --login -i -c "/c/GitRepo/PythonScripts/statusandwait.sh"
    

提交回复
热议问题