diff --git a/script/persist.sh b/script/persist.sh new file mode 100644 index 0000000..ea0867d --- /dev/null +++ b/script/persist.sh @@ -0,0 +1,30 @@ +@echo off +if "%1"=="" ( + echo Error: Commit message is required + echo Usage: persist "Your commit message" + echo Example: persist "Fixed login bug" + exit /b 1 +) + +echo Adding all changes... +git add . +if errorlevel 1 ( + echo Error: Failed to add changes + exit /b 1 +) + +echo Committing with message: "%*" +git commit -a -m "%*" +if errorlevel 1 ( + echo Error: Failed to commit + exit /b 1 +) + +echo Pushing to remote... +git push +if errorlevel 1 ( + echo Error: Failed to push + exit /b 1 +) + +echo All operations completed successfully! \ No newline at end of file