Automating Git push/pull with Batch
when the actual meaning of the commit isn’t that important as long as the repo is in sync:
git pull git checkout main git add -a git commit -am "sync" git push
note that github uses “main” by default where gitlab is using “master” as default branch!
In case the .bat is usually called by another file and a paramter is passed, use this:
git pull git checkout main git add -a git commit -am %1 git push
to manually pull, commit and push you simply cd into the dir and do