Tag: git-gc

  • 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.