I have a large number of projects setup in Git that were previously managed in CVS. Tortoise CVS as well as Eclipse both made it very easy to see (via icon overlays) if I ha
Yesterday I tried to roll my own solution. Here's what I came up with (for a single repository):
#!/bin/sh
for ref in $(git for-each-ref --format='%(refname)' refs/remotes/); do
ending=${ref#refs/remotes/}
remote=${ending%/*}
branch=${ending#*/}
if [ "${branch}" == "HEAD" ]; then continue; fi
echo -e "\e[1;34m$branch on $remote\e[0m"
echo "AHEAD by:"
git log --oneline $branch ^$remote/$branch
echo "BEHIND by:"
git log --oneline $remote/$branch ^$branch
done
This was based off info I've pulled several sources including answers here. I'm still a bit shady on what the 'git log' command is doing given the parameters I'm providing -- but it seems to spit out the kind of info I want.