Skip to content

Instantly share code, notes, and snippets.

@baroquebobcat
Forked from gilesbowkett/compare_branches.bash
Created October 16, 2013 00:23
Show Gist options
  • Save baroquebobcat/7000759 to your computer and use it in GitHub Desktop.
Save baroquebobcat/7000759 to your computer and use it in GitHub Desktop.
function silencing_stderr() {
$* 2>/dev/null
}
function branch_names() {
git br | awk '{print $1}' | grep -v '*' | xargs
}
function most_recent_commit() {
git log . | grep "Date: " | cut -c 9- | head -1
}
for branch_name in $(branch_names)
do
silencing_stderr git co $branch_name
echo $branch_name $(most_recent_commit)
done
git co master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment