Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

docs: Suggest a blobless clone instead of a shallow clone #64693

Merged
merged 1 commit into from
Apr 18, 2024
Merged

Conversation

bgw
Copy link
Member

@bgw bgw commented Apr 18, 2024

GitHub recommends blobless clones over shallow clones: https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/

For these reasons 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!

I've been using blobless clones for development for the last couple weeks. The blobless clone has the benefit of including the full repository history (for the cloned branch). Tools like git blame will be slower as git fetches the related blobs on-demand.

Benchmarks (using all the flags in the docs):

  • The blobless clone is faster on my machine, taking 11.1 seconds versus 13.1 seconds for the shallow clone.
  • The blobless clone takes up 256M on disk, versus 244M for the shallow clone. It's worse, but not by much.

GitHub recommends blobless clones over shallow clones: https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/

> For these reasons 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!

I've been using blobless clones for development for the last couple weeks. The blobless clone has the benefit of including the full repository history (for the cloned branch). Tools like `git blame` will be slower as git fetches the related blobs on-demand.

Benchmarks (using all the flags in the docs):
- The blobless clone is faster on my machine, taking 11.1 seconds versus 13.1 seconds for the shallow clone.
- The blobless clone takes up 256M on disk, versus 244M for the shallow clone. It's worse, but not by much.
@ijjk ijjk added the created-by: Turbopack team PRs by the Turbopack team. label Apr 18, 2024
Copy link
Member Author

bgw commented Apr 18, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @bgw and the rest of your teammates on Graphite Graphite

@bgw bgw marked this pull request as ready for review April 18, 2024 00:12
@bgw bgw merged commit 792b848 into canary Apr 18, 2024
37 checks passed
@bgw bgw deleted the bgw/clone-docs branch April 18, 2024 15:35
@github-actions github-actions bot added the locked label May 3, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 3, 2024
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
created-by: Turbopack team PRs by the Turbopack team. locked
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants