Git 2.26 has been released. The open source Git project announced the latest version on the GitHub Blog. Let’s dive right in and take a look at the new and updated features.
SEE ALSO: Gitea 1.11.0: Open source self-hosting Git solution gets a new update
Updates for git sparse-checkout
The sub-command git sparse-checkout
was first introduced in Git 2.25 to replace more complicated .gitignore
patterns in .git/info/sparse-checkout
and make working with partial clones and sparse checkouts easier.
In Git 2.26, the “cone” mode of git sparse-checkout
has been refined, and the additional mode git sparse-checkout add
is now included.
The git sparse-checkout add
mode lets you add new dictionary entries one at a time, as demonstrated in the blog post:
$ git clone --filter=blob:none --sparse [email protected]:git/git.git Cloning into 'git'... remote: Enumerating objects: 175470, done. remote: Total 175470 (delta 0), reused 0 (delta 0), pack-reused 175470 Receiving objects: 100% (175470/175470), 59.07 MiB | 10.48 MiB/s, done. Resolving deltas: 100% (111328/111328), done. remote: Enumerating objects: 379, done. remote: Counting objects: 100% (379/379), done. remote: Compressing objects: 100% (379/379), done. remote: Total 431 (delta 0), reused 0 (delta 0), pack-reused 52 Receiving objects: 100% (431/431), 1.73 MiB | 4.06 MiB/s, done. Updating files: 100% (432/432), done. $ cd git $ git sparse-checkout init --cone $ git sparse-checkout add t remote: Enumerating objects: 797, done. # ... Updating files: 100% (1946/1946), done. $ git sparse-checkout add Documentation remote: Enumerating objects: 334, done. # ... Updating files: 100% (723/723), done. $ git sparse-checkout list Documentation t
Source : JAXenter