This page shows the source for this entry, with WebCore formatting language tags and attributes highlighted.

Title

Pointers for large files and repositories in Git

Description

<a href="https://old.reddit.com/r/git/comments/1j8mumh/how_to_add_files_to_a_large_repository/" source="Reddit">How to Add files to a Large Repository?</a> Git has opt-in support for handling large files. <ul> Use the <a href="https://git-scm.com/docs/git-clone#Documentation/git-clone.txt-code--depthltdepthgtcode"><c>--depth</c></a> option to control how much history to clone (good for pipelines, where you're usually only interested in the tip, so <c>depth 1</c>) Whereas <c>depth</c> controls how much you <i>clone</i> (size of the <c>.git</c> folder), <a href="https://git-scm.com/docs/git-sparse-checkout"><c>sparse-checkout</c></a> controls the size of your working tree. <img attachment="git_logo.png" align="right" caption="git logo">Use <a href="https://git-lfs.com/">LFS (Large File Storage)</a> to store files. This will not remove large files from existing commits. This feature is seamless to enable and well-supported throughout the ecosystem. Once you've set up LFS for future commits, you can consider removing large files from already-existing commits using something like <a href="https://rtyley.github.io/bfg-repo-cleaner/">BFG</a> and then re-adding them with LFS. </ul>