Skip to content

Instantly share code, notes, and snippets.

@terraboops
Last active December 18, 2015 22:09
Show Gist options
  • Save terraboops/5852376 to your computer and use it in GitHub Desktop.
Save terraboops/5852376 to your computer and use it in GitHub Desktop.
List all branches and date of latest commit for a repo. Great for coordinating restoration of distributed backups after git remote data loss.
git for-each-ref --shell --format='echo ${PWD##*/} - %(refname); git show --format="%ci %cr" %(refname) | head -n 1' refs/heads/ | bash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment