Created
March 15, 2019 08:06
-
-
Save Park-Ju-hyeong/a4b554145037576330ccf81ea479ba52 to your computer and use it in GitHub Desktop.
자동으로 github 에 push 해주는 배치파일
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
: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