Wednesday, May 27, 2009

Sometimes it's the simplest things...

I pulled a svn repository (containing a ton of projects) onto a local filesystem using git-svn and wanted to run "git gc" on each project to see how much space I could free up. (1.1GB down to 800MB btw) - sure I could do it by hand or write a quick script, but how about one line on the CL?
for d in `ls -D`; do cd $d; git gc; cd ..; done
(Those are backticks by the way)

No comments: