Created
June 1, 2016 07:40
-
-
Save DmitriyZaitsev/f9fe017c11a708311c73f23dcf92ee3e to your computer and use it in GitHub Desktop.
Easily track which branches need updating (http://stackoverflow.com/a/866353/965226)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git for-each-ref 'refs/heads/*' | \ | |
while read rev type ref; do | |
branch=$(expr "$ref" : 'refs/heads/\(.*\)' ) | |
revs=$(git rev-list $rev..master) | |
if [ -n "$revs" ]; then | |
echo $branch needs update | |
git diff --summary --shortstat -M -C -C $rev master | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment