Mining my Git repositories

Since I started using Git, I’ve been finding myself creating tons of repositories. Anything I think might _someday_ prove interesting or that I work on for more than a few minutes, I create a Git repository. I’ve yet to discover that *ultimate* workflow, but between experimenting with using it to put presentations online, managing the Dallas.rb website via Git and using it extensively at FiveRuns, Git is proving quite fun.

But let’s get back to that earlier point: I have a metric shit-ton of repositories laying around in my home directory. This morning I found myself wondering exactly how many I have and how many actually have a remote (i.e. how many have yielded a project worth backing up remotely and/or sharing). So, I did the numbers:

Directory Repositories Remotes
@/Users/adam@ (Home, sweet home) 287 263
@~/FiveRuns@ (Work stuff) 161 160
@~/repos@ (All source-ish stuff) 85 69
@~/repos/sources@ (Interesting code of others) 62 60
@~/repos/projects@ (My own code) 9 6
@~/Desktop@ (Landing pad for the newest of projects) 1 0

Which is about what I’d expect in terms of quantity and ratio. I’m a little surprised I have so many work repositories laying around, but we use submodules extensively so there’s probably only about 40 repositories that are meaningful to us. I’m a little suprised that so many of my personal projects do have remotes though. I guess I’m making progress towards doing more.

For those interested, the script that begat all this fun data. Run it yourself and share your numbers!

One thought on “Mining my Git repositories

  1. Thank you very much for this script.

    I just started using Git so my counts are quite lower than yours:

    12 repos where 10 are remote ones.


Comments are closed.