Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

bat file to issue a git pull command and leave the git bash window open

I have a .bat file that will access a git-hub repository and then issue the "git pull" command. I would like for the Git Bash window to stay open once the "git pull" is complete. Any suggestions? The .bat code that I'm using is below.

cd Class/UKED201801FSF2-Class-Repository-FSF

c:\Users\johnc\AppData\Local\Programs\Git\git-bash.exe -c 'git pull'
like image 973
John Coleman Avatar asked Jan 19 '26 03:01

John Coleman


2 Answers

As in "Open git bash shell window, execute command and remain after term signal", see if you can add a shell command after your (here git pull) original command

git-bash -c '...; exec bash'
like image 164
VonC Avatar answered Jan 21 '26 22:01

VonC


Your .bat should be:

cd Class/UKED201801FSF2-Class-Repository-FSF
c:\Users\johnc\AppData\Local\Programs\Git\git-bash.exe -c 'git pull; exec sh'
like image 25
Braca Avatar answered Jan 21 '26 21:01

Braca



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!