make push improv

main
Dominik Madarász 2024-08-31 09:04:08 +02:00
parent bba1b719e8
commit 9facdb275c
1 changed files with 14 additions and 0 deletions

View File

@ -232,6 +232,20 @@ if "%1"=="dpush" (
if "%1"=="push" ( if "%1"=="push" (
call make.bat tidy call make.bat tidy
git diff --quiet --exit-code
if !ERRORLEVEL! neq 0 (
echo There are uncommitted changes. Please commit or stash them before pushing.
exit /b 1
)
git fetch origin
git rev-parse HEAD > .git\FETCH_HEAD
fc .git\HEAD .git\FETCH_HEAD > nul
if !ERRORLEVEL! equ 0 (
echo Already up to date with remote. Nothing to push.
exit /b 0
)
git status git status
if "%2"=="dp" ( if "%2"=="dp" (
call MAKE.bat dpush auto call MAKE.bat dpush auto