Skip to content

Instantly share code, notes, and snippets.

@yaotti
Created December 14, 2009 14:20
Show Gist options
  • Save yaotti/256081 to your computer and use it in GitHub Desktop.
Save yaotti/256081 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
commit = ARGV.empty? ? 'HEAD' : ARGV.shift
puts `git log --pretty=oneline #{commit}`.split(/\s+/)[0]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment