Shallow cloning git repos

Just making a note of something that might be very useful going forward. I needed to use `​git clone –depth 10 ` to clone a repo but only get the last 10 commits of it.

It helped me cloning the linux repo many years back on a horrible internet connection. This essentially doesn’t clone the entire repo’s history, however, it would clone all files and history relevant to the last 10 commits.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s