Skip to content

Instantly share code, notes, and snippets.

@fredsmith
Created March 27, 2014 14:12
Show Gist options
  • Save fredsmith/9808450 to your computer and use it in GitHub Desktop.
Save fredsmith/9808450 to your computer and use it in GitHub Desktop.
#! /bin/bash
function print { awk "{print \$$1}"; }
for dir in *; do
if [[ -d $dir/.git ]]; then
pushd $dir > /dev/null;
echo -n "$dir : "
#git rev-parse --verify HEAD
git ls-remote origin -h refs/heads/master 2> /dev/null | print 1
git status --short -b;
popd > /dev/null;
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment