Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

clone-filter.en-us.md 1.4KB

12345678910111213141516171819202122232425262728293031323334353637
  1. ---
  2. date: "2021-02-02"
  3. title: "Clone filters (partial clone)"
  4. slug: "clone-filters"
  5. weight: 25
  6. draft: false
  7. toc: false
  8. menu:
  9. sidebar:
  10. parent: "advanced"
  11. name: "Clone filters"
  12. weight: 25
  13. identifier: "clone-filters"
  14. ---
  15. # Clone filters (partial clone)
  16. Git introduces `--filter` option to `git clone` command, which filters out
  17. large files and objects (such as blobs) to create partial clone of a repo.
  18. Clone filters are especially useful for large repo and/or metered connection,
  19. where full clone (without `--filter`) can be expensive (as all history data
  20. must be downloaded).
  21. This requires Git version 2.22 or later, both on the Gitea server and on the
  22. client. For clone filters to work properly, make sure that Git version
  23. on the client is at least the same as on the server (or later). Login to
  24. Gitea server as admin and head to Site Administration -> Configuration to
  25. see Git version of the server.
  26. By default, clone filters are enabled, unless `DISABLE_PARTIAL_CLONE` under
  27. `[git]` is set to `true`.
  28. See [GitHub blog post: Get up to speed with partial clone](https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/)
  29. for common use cases of clone filters (blobless and treeless clones), and
  30. [GitLab docs for partial clone](https://docs.gitlab.com/ee/topics/git/partial_clone.html)
  31. for more advanced use cases (such as filter by file size and remove
  32. filters to turn partial clone into full clone).