Do GitHub and GitLab support git clone's --filter parameter?

This almost certainly isn't supported by GitHub or GitLab yet.

The --filter option is under active development and isn't really ready for general-purpose consumption yet. GitHub's blog post about the release of Git 2.19 in September, 2018 says

Note that most public servers do not yet support the feature, but you can play with git clone --filter=blob:none against your local Git 2.19 install.

Once this feature becomes more fully-developed and hosts start to support it I'm sure they won't do so quietly. As far as I know, no major cloud provider has made such an announcement yet.

Update from OP 2019-03-21:

Not long ago, I received an official reply from github. They think that the --filter parameter is still an immature feature and is accompanied by some security issues. Therefore, this feature will not be supported in the short term.


This is supported by GitLab 13.0 (May 2020)

Exclude large files using Partial Clone

Storing large binary files in Git is normally discouraged, because every large file added will be downloaded by everyone who clones or fetches changes thereafter.
This is slow, if not a complete obstruction when working from a slow or unreliable internet connection.

In GitLab 13.0, Partial Clone has been enabled for blob size filters, as well as experimentally for other filters.

This allows troublesome large files to be excluded from clones and fetches. When Git encounters a missing file, it will be downloaded on demand.

When cloning a project, use the --filter=blob:none or --filer=blob:limit=1m to exclude blobs completely or by file size.
Note, Partial Clone requires at least Git 2.22.0.

(see also "What is the git clone --filter option's syntax?")

Read more in our recent blog, "How Git Partial Clone lets you fetch only the large file you need", from James Ramsay.

See documentation and issue.