Skip to content

Instantly share code, notes, and snippets.

@viktorklang
Created June 30, 2015 08:43
Show Gist options
  • Save viktorklang/2316a5b32e18bd74bc8b to your computer and use it in GitHub Desktop.
Save viktorklang/2316a5b32e18bd74bc8b to your computer and use it in GitHub Desktop.
shell alias for showing git branches sorted by last activity date
alias gbr='git for-each-ref --sort="-authordate:iso8601" --format=" %(color:green)%(authordate:iso8601)%09%(color:white)%(refname:short)" refs/heads'
@nightscape
Copy link

The corresponding git alias (in ~/.gitconfig) would be

[alias]
   br = for-each-ref --sort='-authordate:iso8601' --format=' %(color:green)%(authordate:iso8601)%09%(color:white)%(refname:short)' refs/heads

@nightscape
Copy link

By the way:
alias g=git
;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment