Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save breyten/4706929 to your computer and use it in GitHub Desktop.
Save breyten/4706929 to your computer and use it in GitHub Desktop.
List unmerged branches with the latest commit message for each branch
# Credit http://stackoverflow.com/a/2514279
for branch in `git branch --no-merged`;do echo -e `git show --abbrev-commit --format="%ci %d %s" $branch | head -n 1`; done | sort -r
# Example output (resulting from running command on the Rails repo and making a test branch — https://github.com/rails/rails)
2013-02-04 15:22:28 +0100 (test) Rails is called Railzzz now.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment