Skip to content

Instantly share code, notes, and snippets.

@joliss
Last active August 29, 2015 14:26
Show Gist options
  • Select an option

  • Save joliss/005635daf5125c1d4ab3 to your computer and use it in GitHub Desktop.

Select an option

Save joliss/005635daf5125c1d4ab3 to your computer and use it in GitHub Desktop.
glog() {
# requires git 1.8.3 for %C(auto) syntax
git log --graph --date=short --pretty="%Cblue%ad%Creset %C(auto)%h %Cblue%an%Creset%C(auto) %s __REFS:%d" "$@" \
| perl -pe 's/__REFS:[^(]*\(([^)]+)\).*/$refs=$1; $refs=~s{, }{ }g; $refs=~s{tag: }{}g; $refs/e' \
| less;
}
gl() {
glog "$@" | head -n 10;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment