Skip to content

Instantly share code, notes, and snippets.

@KL-7
Created November 25, 2012 10:35
Show Gist options
  • Save KL-7/4143035 to your computer and use it in GitHub Desktop.
Save KL-7/4143035 to your computer and use it in GitHub Desktop.
Git graph log
#!/bin/bash
set -e
ruby -e "
left = %x(git log --graph --oneline --decorate --date-order $1 --color=always).lines
right = %x(git log --graph --oneline --decorate --date-order $1 --pretty=format:'%C(bold green)(%cr)%C(reset) %C(bold cyan)<%an>%C(reset)').lines
puts left.zip(right).map { |l, r| %Q(#{l.chop} #{r[/^[\s\*\\\|\/_]*(.*)$/, 1]}) }
" | less -R
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment