Bitbucket Data Center 7.13 will enable using git clone --filter when paired with Git 2.18+ on the server. Which filters will be available will depend on the server's Git version, and is not something Bitbucket Data Center controls directly. For example, to use git clone --filter=tree:0 requires Git 2.20+ on both server and client. If Git <2.18 is installed on the server, git clone --filter will not be available.
Partial clones will be enabled by default, if the server is running Git 2.18+. Administrators who do not want partial clones to be available can set plugin.bitbucket-git.hosting.allow-filter=false in bitbucket.properties to disable the feature, even if Git 2.18+ is installed on the server. For some instances disabling this may be desirable, because some filter combinations supported by Git are extremely expensive for the server to calculate and result in significantly higher server load than a normal full or shallow clone.
Organizations that plan to make heavy use of partial clones should ensure their Git clients are 2.19 or newer. While Git 2.18 clients can use git clone --filter, 2.19.0 introduced a change which allows the server side to detect that requests after the first are part of a partial clone setup, which allows the server to avoid caching the resulting packs.
Note: This is for Bitbucket Data Center only. Partial clones are still not possible for Bitbucket Cloud, which is a different system with a different codebase in a different language.
Bryan Turner - Principle Developer
Bitbucket Data Center
A user needs to clone a large repository. If a user needs to work in a certain subdirectory of the repository, they are required to clone the entire repository. When a repository is large (Example: 1GB+) it can take some time to clone files that may not be required.
Since Git 2.18, Git protocol v2 has introduced the --filter flag to enable partial clones
This will allow users to clone specific subdirectories of a repository only.
Why this is important
This will increase cloning performance on large repositories.