Skip to content

Instantly share code, notes, and snippets.

@ybur-yug
Created August 9, 2016 19:16
Show Gist options
  • Save ybur-yug/72227f8baee96e4ff36844b4f631949c to your computer and use it in GitHub Desktop.
Save ybur-yug/72227f8baee96e4ff36844b4f631949c to your computer and use it in GitHub Desktop.
[alias]
l = "!source ~/.githelpers && sexy_git_log"
# if alias already exists just add the l line, otherwise add whole section
#!/bin/bash
# save @ ~/.githelpers
HASH="%C(yellow)%h%C(reset)"
RELATIVE_TIME="%C(green)%ar%C(reset)"
AUTHOR="%C(white)%an%C(reset)"
REFS="%C(red)%d%C(reset)"
SUBJECT="%s"
FORMAT="$HASH^$RELATIVE_TIME^$AUTHOR^$REFS $SUBJECT"
function sexy_git_log() {
git log --graph --pretty="tformat:$FORMAT" $* |
column -t -s '^' |
less -FXRS
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment