Skip to content

Instantly share code, notes, and snippets.

@nordringrayhide
Created February 10, 2011 08:01
Show Gist options
  • Save nordringrayhide/820113 to your computer and use it in GitHub Desktop.
Save nordringrayhide/820113 to your computer and use it in GitHub Desktop.
Git based Weekly report
git-timesheet
#!/usr/bin/env ruby
email = `git config --get user.email`
history = `git log --date=iso --since="1 week ago" --format="%ad %s" --no-merges --simplify-merges --reverse --committer=#{email}`
history.split(/\n/).group_by { |event| event[0,10] }.sort.reverse.each do |date, commits|
puts "#{date}\n#{"=" * 10 }"; puts commits.map { |commit| commit[10, 1024] }.sort; puts
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment