Skip to content

Instantly share code, notes, and snippets.

@suzuki
Created April 14, 2016 12:34
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 suzuki/22f3be01ed6517aef17a7630e4cc4d29 to your computer and use it in GitHub Desktop.
Save suzuki/22f3be01ed6517aef17a7630e4cc4d29 to your computer and use it in GitHub Desktop.
#!/bin/sh
DIRS=`find ./ -type d -name .git -depth 3`
for D in $DIRS
do
pushd . > /dev/null
cd $D
echo `dirname $D`
git rev-parse --abbrev-ref HEAD
popd > /dev/null
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment