Skip to content

Comment on GitHub’s Large File Storage is no panacea for Open Sourceparent

Comments

If you're talking about binary files merged into Git itself (not Git LFS, which is a separate mechanism), you can use "git clone --depth <n>" to get only the latest <n> revisions of the tree, and then use "git pull --unshallow" if you need to fetch the rest of the history.

Can I do that automatically so that only binaries are fetched shallow, and text is fetched deep? Otherwise it's not very useful.

My best guess would be to keep the binaries in a submodule, then after fully cloning the main repo, you would fetch the binaries with "git submodule update --init --depth 1".

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.