Skip to content

Instantly share code, notes, and snippets.

@davzoku
Created December 21, 2017 13:36
Show Gist options
  • Save davzoku/5fff704308d1adc7c8394fe2d7579765 to your computer and use it in GitHub Desktop.
Save davzoku/5fff704308d1adc7c8394fe2d7579765 to your computer and use it in GitHub Desktop.
🛠️ git pull all repositories in .bat and .sh
Credits to:
.bat https://stackoverflow.com/questions/24223630/how-to-git-pull-for-multiple-repos-on-windows
.sh https://stackoverflow.com/questions/3497123/run-git-pull-over-all-subdirectories
for /f %%f in ('dir /ad /b C:\code\github\') do cd /d C:\code\github\%%f & call git pull & cd ..
#!/bin/bash
for i in */.git; do ( echo $i; cd $i/..; git pull; ); done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment