git bat批处理文件怎么编写?

@echo off
cls
@title git一键执行push操作

:1
cls
Chcp 936>nul
@echo.
@echo $ git status
@echo.
git status
@echo.
@echo $ git add .
@echo.
set /p a= $ git commit -m 
if "%a%"=="" (
    @echo 输入不可为空,请重新输入说明信息!!!
    goto 1
)

Chcp 65001>nul
git status
@echo.
echo $ git add .
@echo.
echo $ git commit -m %a%
@echo.
echo $ git push 

::这里写git的命令
git add .
git commit -m %a%
git push
::这里写git的命令

@echo.
@echo.
@echo.
@echo git push 完成!!!
@echo.
@echo 【按任意键退出】

pause>nul

exit

 新建一个 git_push.bat文件复制代码进去

 

posted @ 2017-08-11 16:26  丶老中医  阅读(1693)  评论(0编辑  收藏  举报
一切已经开始©2018 丶老中医