Skip to content

Instantly share code, notes, and snippets.

@dce
Created January 8, 2009 15:23
Show Gist options
  • Save dce/44754 to your computer and use it in GitHub Desktop.
Save dce/44754 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