Download Part of a Large GitHub Repo Using SVN

Whether you’re using “microservices in a monorepo” design or just need a subdirectory of a large GitHub repo, you definitely don’t have to clone the entire repo to work with just a handful of files. Instead, use GitHub’s ability to convert any to repo to SVN, to get just the files you need.

Here’s how it works. Consider the Linux kernel repository. Say you’re working on the GPU documentation, in the Documentation/gpu subdirectory of this repo. Start by opening the directory in your browser & noting its URL. In our case, it’s Now just replace the tree/master part of the URL by trunk & use the resulting URL in SVN checkout:

> svn checkout
A    gpu/afbc.rst
A    gpu/amdgpu-dc.rst
A    gpu/amdgpu.rst
A    gpu/vgaarbiter.rst
A    gpu/vkms.rst
A    gpu/xen-front.rst
Checked out revision 1006575.

That’s all there’s to it! You now have the gpu directory cloned!

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 )

Google photo

You are commenting using your Google 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

This site uses Akismet to reduce spam. Learn how your comment data is processed.