标签:style blog class code c java
1 @echo off 2 setlocal enabledelayedexpansion 3 git status||goto :eof 4 5 set "msg=quick push. %date% %time%" 6 if #%1==# (set /p "msg=commit message?"&pause&set "msg=!msg! %date% %time%") 7 8 if not #%1==# set "msg=%* %date% %time%" 9 echo Commit message is "!msg!" 10 git commit -a --message="!msg!" & git push 11 12 git status 2>&1 | find "nothing to commit" >nul && set "commitret=‘git commit‘ completed successfully." || set "commitret=‘git commit‘ failed!" 13 git fetch --dry-run -v 2>&1 | find "up to date" && set "pushret=‘git push‘ completed successfully." || set "pushret=‘git push‘ failed!" 14 15 echo. 16 echo %commitret% 17 echo %pushret%
批处理脚本,git本地workspace一键推送到远端repo,布布扣,bubuko.com
批处理脚本,git本地workspace一键推送到远端repo
标签:style blog class code c java
原文地址:http://www.cnblogs.com/wenqiushi/p/batch_gcp.html