What is the git clone --filter option's syntax?

前端 未结 2 1872
说谎
说谎 2020-12-03 10:39

The Git 2.17 changelog describes this option:

  • The machinery to clone & fetch, which in turn involves packing and unpacking objects, has
2条回答
  •  我在风中等你
    2020-12-03 11:35

    The format for filter-spec is defined in the options section of git rev-list --help. You can also see it on github. Here's what it currently says:

    --filter=

    Only useful with one of the --objects*; omits objects (usually blobs) from the list of printed objects. The may be one of the following:

    The form --filter=blob:none omits all blobs.

    The form --filter=blob:limit=[kmg] omits blobs larger than n bytes or units. n may be zero. The suffixes k, m, and g can be used to name units in KiB, MiB, or GiB. For example, blob:limit=1k is the same as blob:limit=1024.

    The form --filter=sparse:oid= uses a sparse-checkout specification contained in the blob (or blob-expression) to omit blobs that would not be not required for a sparse checkout on the requested refs.

    The form --filter=sparse:path= similarly uses a sparse-checkout specification contained in .

提交回复
热议问题