@echo off :: Add all files to Git git add . :: Prompt for commit message set /p commitMessage="Enter the commit message: " :: Commit the changes git commit -m "%commitMessage%" :: Confirm if the user wants to push the changes set /p confirmPush="Do you want to push the changes to the main branch? (yes/no): " if /i "%confirmPush%"=="yes" ( git push origin ) else ( echo Changes not pushed. )