TIL: Big Git Repos

And How to Clone Them.

Vincent Warmerdam koaning.io
2021-10-14

I work for Rasa. We host an open-source project on GitHub that allows folks to train their own virtual assistants. It’s a big repo, here’s the latest stats according to shields.io.

At the time of writing this blogpost you’d need to download 1.54Gb of code if you’d like to get started with a PR. That’s a lot.

Fix

There’s a fix though. Instead of using:

git clone

You can use:

git clone --depth <depth> -b <branch> <repo_url>

This way you can limit what you’ll download. You can point to a main branch and specify how deep you’d like to clone. You likely won’t need all the changes to be on disk so this can be a huge timesaver!