code.gitea.io/gitea@v1.22.3/docs/content/usage/clone-filter.en-us.md (about)

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