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:\Windows\SysWOW64\cmd.exe /c ""C:\Program Files (x86)\Git\bin\sh.exe" --login -i" REM retrieve archive git archive master | tar -x -C %~1 REM quit GitBash exit
I noticed that the GitBash is logging out before the next command "git archive...". Does anybody know if I can pass the command into GitBash and how?
Mike
You can allocate STDIN, STDOUT, and STDERR as z/OS UNIX files, using the PATH operand on the DD statements. You can also allocate STDOUT and STDERR as MVS data sets. Example: User TURBO runs a shell script in batch, as follows: The STDIN ddname defines a shell script to be invoked, /u/turbo/bin/myscript.sh.
Launch Git Bash console by clicking on the Start button, type git, and click on Git Bash. 2. Run the below git config command to add your name ( YourName ) as your git username ( user.name ). The git config command administers configuration variables that control how Git looks and operates.
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"
"C:\Program Files (x86)\Git\bin\sh.exe" --login -i -c "git archive master | tar -x -C $0" "%~1"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With