Git-gc'ing all git repositories

by

I was running out of storage space on my machine, so I started to search for things to remove using Grand Perspective. Some of the big files were inside Git repositories, or rather, inside the .git directory of those repositories. I decided it was time to run the Git garbage collector on them, all of them.

I wrote this little script:

#!/usr/bin/env bash

echo "Gitgcing $1"
cd "$1"

and with this line:

find . -name ".git" -type d -exec gitgc "{}" ";"

run in my home directory, I got all my repos gc’ed.


One response to “Git-gc'ing all git repositories”

  1. […] after a post I found here. Related Posts:Quick and Easy PHP WHOIS ScriptAutomatic JS Broken Image ReplacementCreating a […]

Leave a Reply

You may also like:

Hi, I'm Pablo, this is my web site. You can follow me or connect with me:

Or get new content delivered directly to your inbox.

Join 4,048 other subscribers

I'm writing a book

Stack of copies of How to Hire and Manage Remote Teams

How to Hire and Manage Remote Teams, where I distill all the techniques I've been using to build and manage distributed teams for the past 10 years.

I write about:

announcement blogging book book review book reviews books building Sano Business C# Clojure ClojureScript Common Lisp database Debian Esperanto Git ham radio history idea Java Keep on Posting Kubuntu Lisp Non-Fiction OpenID programming Python Radio Society of Great Britain Rails rant re-frame release Ruby Ruby on Rails Sano science science fiction security self-help Star Trek startups technology Ubuntu web WordPress

I've been writing for a while:

%d bloggers like this: