Skip to content

Instantly share code, notes, and snippets.

@byjg
Created April 16, 2020 01:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save byjg/2b04d2f8869b16c300a1abaa205db921 to your computer and use it in GitHub Desktop.
Save byjg/2b04d2f8869b16c300a1abaa205db921 to your computer and use it in GitHub Desktop.
Get a formatted list with all branches and last commit for each branch
git branch -a | grep remotes | xargs -l | cut -d"/" -f3 | xargs -l git checkout
git for-each-ref --sort=committerdate refs/heads/ --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset); %(color:red)%(objectname:short)%(color:reset); %(contents:subject); %(authorname); (%(color:green)%(committerdate:relative)%(color:reset))'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment