I cloned a git repo and noticed a status line Filtering content
which was very slow. This doesn't usually appear. What is it?
remote: Enumerating objects: 30, done.
remote: Counting objects: 100% (30/30), done.
remote: Compressing objects: 100% (26/26), done.
remote: Total 16592 (delta 6), reused 9 (delta 4), pack-reused 16562
Receiving objects: 100% (16592/16592), 14.14 MiB | 1.01 MiB/s, done.
Resolving deltas: 100% (7529/7529), done.
Checking out files: 100% (11475/11475), done.
Filtering content: 6% (115/1729), 390.32 MiB | 1.12 MiB/s
git clone is primarily used to point to an existing repo and make a clone or copy of that repo at in a new directory, at another location. The original repository can be located on the local filesystem or on remote machine accessible supported protocols. The git clone command copies an existing Git repository.
The idea is to use the git-clone to clone the repository. This will automatically fetch all the branches and tags in the cloned repository. To check out the specific branch, you can use the git-checkout command to create a local tracking branch.
Cloning only a subdirectory is not possible in Git. The network protocol doesn't support it, the storage format doesn't support it. Every single answer to this question always clones the whole repository.
Clone a repo vs Download a zipWhen you clone a repo, you make a copy of the complete history of the git repo including the . git folder (we learned in the earlier lesson). When you download the repo, you just download the source files of the most recent commit of the default branch without the . git folder.
When using --filter, the supplied <filter-spec> is used for the partial clone filter. For example, --filter=blob:none will filter out all blobs (file contents) until needed by Git. Also, --filter=blob:limit=<size> will filter out all blobs of size at least <size>. For more details on filter specifications, see the --filter option in git rev-list.
In gityou 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.
git clone is a Git command line utility which is used to target an existing repository and create a clone, or copy of the target repository. In this page we'll discuss extended configuration options and common use cases of git clone .
If Git is not able to clone due to a weak connection, it would display a fatal error and the user is requested to try again until the above message does not appear. Confirm the cloning by listing the directories once again using the ls command which lists all the files and folder.
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.
It used to be that this was always handled file by file during checkout
or add
operations. It can be more efficient to handle all of the "smudge' filters for a checkout in a more batched manner, and git added support for that relatively recently.
The use case that (I believe) drove that addition is called LFS. With LFS, large content is stored in a secondary repo, with small placeholders ("pointer files") replacing them in the core repo. The "smudge" filter downloads the real content and puts it in place of the pointer file. This is most likely what your repo is doing, and it can be a lengthy process.
In general, though, the 'filtering' status line just means that a batch of smudge filters is being run on the checked-out cotent.
The repo is using Git LFS, which is a git extension for versioning large files alongside a git repository.
https://git-lfs.github.com/ https://github.com/git-lfs/git-lfs/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With