Git 2.26 sets protocol v2 as default and updates git sparse-checkout
The version control system Git has received its latest update. Git 2.26 sets v2 of the network fetch protocol as default and continues working on
git sparse-checkout that was introduced in the previous version, which was released two months ago. Let’s see what has changed for this command and what else is new.
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.
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.
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 firstname.lastname@example.org: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