Skip to content

Instantly share code, notes, and snippets.

@whatupfoo
Last active August 28, 2024 17:07
Show Gist options
  • Save whatupfoo/0f61e050011675d960dec6d511eb0db8 to your computer and use it in GitHub Desktop.
Save whatupfoo/0f61e050011675d960dec6d511eb0db8 to your computer and use it in GitHub Desktop.

Tree-less & Blob-less clones

#worfklow

Get up to speed with partial clone and shallow clone - The GitHub Blog

Git clone: a data-driven study on cloning behaviors - The GitHub Blog

Treeless clones are really only helpful for automated builds when you want to quickly clone, compile a project, then throw away the repository. In environments like GitHub Actions using public runners, you want to minimize your clone time so you can spend your machine time actually building your software! Treeless clones might be an excellent option for those environments.

we do not recommend shallow clones except for builds that delete the repository immediately afterwards. Fetching from shallow clones can cause more harm than good!

The only recommended scenario for a treeless partial clone is for quickly cloning on a build machine that needs access to the commit history, but will delete the repository at the end of the build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment