Skip to content

Instantly share code, notes, and snippets.

@carld
Created April 29, 2016 01:28
Show Gist options
  • Save carld/87f2453ed622f92f220451b7e8ae6a26 to your computer and use it in GitHub Desktop.
Save carld/87f2453ed622f92f220451b7e8ae6a26 to your computer and use it in GitHub Desktop.
go through all directories, test for .git/ and diff stat two branches
for dir in `find . -type d -depth 1`; do
cd $dir;
if [ -d .git ]; then
if git branch -ra | grep -q "$B2\$"; then
echo $dir;
git diff --shortstat $B1 $B2;
fi
fi
cd ..;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment