Created
September 11, 2014 18:14
-
-
Save Radnen/749035ac9342f1e4e19d to your computer and use it in GitHub Desktop.
Git batchscript folder updater
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
:: update.bat | |
::--------------------------------------------------------- | |
:: A batch script that updates all git repos in a directory | |
:: By: Andrew Helenius - September 11th, 2014 | |
::--------------------------------------------------------- | |
:: | |
:: In order to work git must be in your PATH | |
:: | |
:: Caveats: | |
:: | |
:: - It does not identify git directories from standard directories | |
:: expect it to fail often. But it'll still get the job done. | |
:: | |
:: - It is not recursive for sake of use, it's made to be copied into any | |
:: root folder with git repos and ran. | |
:: | |
:: - It will not work inside a git repo | |
FOR /F "tokens=*" %%G IN ('dir /b *') DO git -C %%G pull origin master | |
:: end of file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment