Skip to content

Instantly share code, notes, and snippets.

@barn
Created April 17, 2018 22:45
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 barn/e11440955e873dad4b71f627f357c293 to your computer and use it in GitHub Desktop.
Save barn/e11440955e873dad4b71f627f357c293 to your computer and use it in GitHub Desktop.
Use list of branches by age
~/.gitconfig
[alias]
recent = "!r() { \
git for-each-ref --color=always --sort=-committerdate refs/heads --format='%(HEAD)%(color:yellow)%(refname:short)|%(color:bold green)%(committerdate:relative)|%(color:blue)%(subject)|%(color:magenta)%(authorname)%(color:reset)' \
| column -ts'|' \
| cut -c -$(tput cols) \
;}; r"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment