Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I want to use git's partialClone feature. In this answer I saw the git clone --filter=tree:none <repo> command.

But when trying to execute on github, the prompt warning: filtering not recognized by server, ignoring. It did not work.

I want to know if it is not supported by the GitHub website, or if there is a problem with my settings.

I asked the feedback staff of GitHub and have not got the answer from the technician.

like image 316
Ph0rse Avatar asked Mar 16 '19 10:03

Ph0rse


People also ask

Does GitLab support sparse checkout?

Introduced in GitLab 12.10. For repositories with millions of files and a long history, you can exclude all files and use git sparse-checkout to reduce the size of your working copy.

What is filtering content git clone?

In git you can define "filters" that affect the process of moving files from the index to the work tree ("smudge" filters) and from the work tree to the index ("clean" filters). Typically you'll find a . gitattribute file that associates the filters with files at specific paths.

What is the purpose of git filter branch?

git-filter-branch can be used to get rid of a subset of files, usually with some combination of --index-filter and --subdirectory-filter .

What is the difference between pull and clone?

git pull is a (clone(download) + merge) operation and mostly used when you are working as teamwork. In other words, when you want the recent changes in that project, you can pull. The clone will setup additional remote-tracking branches.


1 Answers

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.

like image 184
Chris Avatar answered Sep 17 '22 15:09

Chris