I'm trying to write a batch file that when I run it will clone a repository locally.
To open the git I have the following command:
C:\Windows\System32\cmd.exe /c "%LOCALAPPDATA%\Atlassian\SourceTree\git_local\bin\sh.exe" --login -i
However no matter what command I put in after this it never runs. I have read somewhere that this is because when you invoke a new shell it never returns to the old one, not sure how true this is, however is there a way for me to run git commands automatically after the git prompt window opens?
So if I run this bat file, it wont echo my text, how come? Why does it ignore all the commands after I open git.
"%LOCALAPPDATA%\Atlassian\SourceTree\git_local\bin\sh.exe" --login -i ECHO THIS IS A TEST
When I run the above script, it opens a git shell, then if I type exit the echo command will run. It is not until I have closed out my git shell that remainder of my batch script gets run. How do I tell my batch script to execute commands within the git shell?