Skip to content

Instantly share code, notes, and snippets.

@coldhawaiian
Created June 24, 2014 18:33
Show Gist options
  • Save coldhawaiian/2bd02edd35a7d3baf300 to your computer and use it in GitHub Desktop.
Save coldhawaiian/2bd02edd35a7d3baf300 to your computer and use it in GitHub Desktop.
Iterate all Git projects
# http://stackoverflow.com/a/24390169/456814
for x in *; do git --work-tree="$x" --git-dir="$x/.git" status; done
for x in *; do
git --work-tree="$x" --git-dir="$x/.git" status
done
# http://stackoverflow.com/a/24352829/456814
for /f "tokens=*" %a in ('dir /ad /b') do git --git-dir=%a/.git --work-tree=%a status
for /f "tokens=*" %%a in ('dir /ad /b') do git --git-dir=%%a/.git --work-tree=%%a status
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment