Skip to content

Instantly share code, notes, and snippets.

@Park-Ju-hyeong
Created March 15, 2019 08:06
Show Gist options
  • Save Park-Ju-hyeong/a4b554145037576330ccf81ea479ba52 to your computer and use it in GitHub Desktop.
Save Park-Ju-hyeong/a4b554145037576330ccf81ea479ba52 to your computer and use it in GitHub Desktop.
자동으로 github 에 push 해주는 배치파일
:loop
:: Navigate to the directory you wish to push to GitHub
::Change <path> as needed. Eg. C:\Users\pookie\Desktop\Writings
cd C:\Users\jhpark\Documents\GitHub\Docker
::Initialize GitHub
git init
::Pull any external changes (maybe you deleted a file from your repo?)
git pull
::Add all files in the directory
git add --all
::Commit all changes with the message "auto push".
::Change as needed.
git commit -m "auto push"
::Push all changes to GitHub
git push
::Alert user to script completion and relaunch.
echo Complete. Relaunching...
::Wait 3600 seconds until going to the start of the loop.
::Change as needed.
TIMEOUT 3600
::Restart from the top.
goto loop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment