Skip to content

Instantly share code, notes, and snippets.

@Radnen
Created September 11, 2014 18:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Radnen/749035ac9342f1e4e19d to your computer and use it in GitHub Desktop.
Save Radnen/749035ac9342f1e4e19d to your computer and use it in GitHub Desktop.
Git batchscript folder updater
:: 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