Skip to content

Instantly share code, notes, and snippets.

@ultrasaurus
Created August 22, 2015 16:52
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ultrasaurus/ce31548b1bf32fd73340 to your computer and use it in GitHub Desktop.
Save ultrasaurus/ce31548b1bf32fd73340 to your computer and use it in GitHub Desktop.
[alias]
st = status
ci = commit
br = branch
co = checkout
df = diff
lg = log -p
branches = for-each-ref --sort='-authordate:iso8601' --format=' %(authordate:relative)%09%(refname:short)' refs/heads
[push]
default = matching
[core]
excludesfile = ~/.gitignore
@ultrasaurus
Copy link
Author

git branches produces something like:

 2 hours ago    dev-humans
 3 hours ago    dev
 33 hours ago   staging
 3 weeks ago    master
 5 weeks ago    wip
 5 weeks ago    local
 6 weeks ago    s3-indexing
 10 weeks ago   searches

@rauchy
Copy link

rauchy commented Aug 23, 2015

Awesome, thank you!

@talbs
Copy link

talbs commented Aug 26, 2015

Sooo good! I'm so happy I stumbled on this. Thanks much!

@robbkidd
Copy link

Lawdy! So much nicer than my awful aging alias:

  aging = "!git branch -a | grep -v HEAD | sed s/^..// | while read branch; do echo `git log -1 --pretty=format:'%Creset%ai %C(red)%h %C(yellow)%ar %C(blue)[%cn] %C(green)' $branch` $branch ; done | sort"

Thank you for sharing!

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