Skip to content

Instantly share code, notes, and snippets.

@ohammersmith
Forked from dce/gist:44754
Created January 13, 2009 02:53
Show Gist options
  • Save ohammersmith/46293 to your computer and use it in GitHub Desktop.
Save ohammersmith/46293 to your computer and use it in GitHub Desktop.
#!/usr/bin/ruby
require 'rubygems'
require 'git'
log = "~/gitlog.txt"
tmp = "/tmp/gitlog"
commit = Git.open('.').log.first
message = [
commit.date.strftime('%D'),
`pwd`.split(/\//).last.strip,
commit.message
] * "\t"
`touch #{log} && echo "#{message}" | cat - #{log} > #{tmp} && mv #{tmp} #{log}`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment