Git 2.25 brings new features for partial cloning
Git 2.25 has been released. It is designed to improve partial cloning of repositories, a feature that is still considered experimental, with the new
git sparse-checkout command. Let’s take a closer look and see what the version control system’s latest release has in store for us.
Around two months have passed since the last update, and now Git 2.25 has arrived with new features and bug fixes from over 84 contributors. The highlights of the new version were presented on the GitHub blog.
Partial cloning and
Git is currently working on partial cloning, an experimental feature that is not yet supported by GitHub. Partial clones are clones of repositories without their complete contents. Sparse checkouts are lists of file path patterns to be specified when checking out repository contents.
The new command
git sparse-checkout is designed to make working with partial clones and sparse checkouts easier. It supports the
disable subcommands, and it should replace more complicated
.gitignore patterns in
When working with very large repositories and sparse-checkout patterns,
git sparse-checkout‘s “cone mode” comes in handy, which allows users to specify which paths and files should be checked out.
In Git 2.22,
--preserve-merges was replaced by
--rebase-merges, and now even mentions of the older deprecated option have been completely removed in the help text.
git log has received some updates as well. You can now choose to show only the part of an email address preceding the @ in usernames, which can be useful when everyone working on a project shares the same company’s domain. Use the command
git log --format='%h %C(cyan)%al %C(yellow)%s to try it out.