Skip to content

Instantly share code, notes, and snippets.

@samdalton
Created July 3, 2012 21:50
Show Gist options
  • Select an option

  • Save samdalton/3043565 to your computer and use it in GitHub Desktop.

Select an option

Save samdalton/3043565 to your computer and use it in GitHub Desktop.
Generate a summary of commits in the last week from a series of git repos
#!/usr/bin/env ruby
if ['-h', '--help', 'help', '--help'].include? ARGV.first
puts "./git-summary <git-dir-1> <git-dir-n>"
exit
end
git_cmd = 'git log --since="1 week ago" --author=`whoami` --branches=master --format="%s" --no-merges'
dirs = ARGV.to_a
dirs.each do |dir|
puts "Changes to #{dir}"
puts "-----------------"
puts `cd ./#{dir} && #{git_cmd}`
puts ""
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment