@echo off setlocal EnableExtensions cd /d "%~dp0.." if "%~1"=="" ( git push goto finish ) git add -A git commit -m "%*" git push :finish endlocal