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
Use Bash is more friendly, for example
# file: backup.sh
cd /c/myProyectPath/
PWD=$(pwd);
function welcome() {
echo "current Dir : $PWD";
}
function backup() {
git pull
#if you have install wamp , we making slqBackup
MYSQLDUMP="/c/wamp/bin/mysql/mysql5.6.12/bin/mysqldump.exe";
$MYSQLDUMP --user=login --password=pass --no-create-info bd > data/backup.sql
git add data/backup.sql;
#generating tar file
git archive -o latest.tar HEAD
}
welcome;
backup;
echo "see you";
sleep 30;
You can run the script:
"C:\Program Files (x86)\Git\bin\sh.exe" --login -i -c "/c/myProyectPath/run.sh"