git log across ALL projects

September 11, 2014

To help me figure out what to put in my timesheets at work I decided to throw together a quick Ruby/bash/git script to put all of my git logs in a single window.

You’ll have to change some things but it should be pretty obvious as to what needs modification: https://gist.github.com/JamesHagerman/f61456eec50f57acd03f

Here’s the code again just in case the gist disappears at some point:

bc(language-ruby).. #!/usr/bin/env ruby require ‘shellwords’

puts “Finding all git repos on this machine…” all_paths = `find ~/ ~~iname “.git”~~not ~~path “.rvm”~~not ~~path “Circuits”~~not ~~path “CLOUDS”~~not -path “disorient”`.split(“”) # puts “Paths: #{all_paths}”

  1. Actually grab the history of each repo and dump it to the command line: all_paths.each_with_index do |path,i| Dir.chdir(path) do fixed_path = Shellwords.escape(path) puts “History of repo at: #{fixed_path}” cmd = “git —no-pager log —pretty=format:ad:an:d:B —date=local —all —committer=ames Hagerman” system(cmd) end puts “==” end

And that’s it!


James Hagerman

Written by James Hagerman

© 2026