概述
这是一篇关于快速提交代码的脚本,VERY GOOD.
window bat 命令
window 批处理命令可以帮我们做很多自动化事情,以下是一个简单的例子。
代码自动部署脚本\
@echo off
title pull-and-commit-szps
color 03
mode con cols=140 lines=20
echo pull code start
echo ++++++++++++++++++++++++++++++++++++++++
git pull
echo ++++++++++++++++++++++++++++++++++++++++
echo pull code done
echo add change start
echo ++++++++++++++++++++++++++++++++++++++++
git add -A .
echo ++++++++++++++++++++++++++++++++++++++++
echo add change end
set /p description=input your commit description :
echo your description : [%description%], and you have 3 seconds to consider.
for /l %%i in (1,1,2) do (
echo %%i
ping -n 2 127.1>nul
)
set /p confirm=confirm your description, input y/n :
echo your confirm info is: [%confirm%]
if /i "%confirm%" == "y" (
echo ++++++++++++++++++++++++++++++++++++++++
git commit -m "%description%"
echo ++++++++++++++++++++++++++++++++++++++++
git push
echo ++++++++++++++++++++++++++++++++++++++++
echo commit and push done.
) else (
echo user not confirm, exist now.
)
pause
功能说明
快速拉取和提交本文件GIT仓库代码。
总结
后续会补充更多的WINDOS脚本,敬请期待。