On Jan. 13, Git 2.25 was released, bringing to one of the most commonly used developer tools new capabilities that will help improve performance and overall developer productivity.
The open-source Git distributed version control system is the core technology that unpins both the GitHub and GitLab code repositories as well as being used in on-premises deployments by enterprises. Created by Linux creator Linus Torvalds in 2005, Git is maintained and expanded by a community of developers. Eighty-four individuals contributed code for the latest Git update; of those, 32 were first-time contributors.
"Git 2.25 provides new features and bug fixes to the entire Git community, including bringing mature and configurable partial clone support to all users, improved support for function signature detection and more," Taylor Blau, software engineer at GitHub, told ITPro Today.
Partial Cloning Comes to Git
In the Git development model, developers can copy, or "clone," a repository so they can work on it in their own environment. A big problem, however, is that a complete clone of a large project can consume a high volume of resources. To alleviate this problem, Git 2.25 offers expanded support for a capability known as partial cloning.
"Partial clones and sparse checkouts are important for larger repositories as it allows developers to download certain parts of their repositories they care about," Blau explained. "These features are especially important to users who work in repositories that are larger than the available space on their hard drive."
James Ramsay, group product manager at GitLab, echoed how beneficial the new partial cloning capabilities in Git are to customers.
"Partial clone is a part of how we hope to help customers like game and animation studios move from Perforce to Git," Ramsay told ITPro Today.
Perforce has a rival version control system now branded as Helix Core that is able to handle large codebases. Git also has the ability to handle large projects with the Git LFS (Large File Storage) extension. That said, Ramsay noted that Git LFS hasn’t been a sufficient solution for many organizations.
One of the ways that the latest Git update enables partial cloning is with the new sparse-checkout command. In a blog post, Blau said the Git sparse-checkout command allows users to play with partial clones and sparse checkouts.
"It can do four things: set the list of paths to checkout, print the current list, and enable or disable sparse checkouts entirely," Blau said. "For now, the Git sparse-checkout command is experimental, and its behavior is subject to change."
Beyond partial cloning, Git 2.25 benefits from a long list of improvements to implementation. Among them is the removal of what the release notes refer to as crufty code and logic accumulated over time around the object parsing and low-level object access used in git fsck. Additionally, unnecessary reading of state variables back from the disk during the Git sequencer operation has been reduced.
Looking forward, expect future Git updates to continue to add optimizations that improve developer experience.
"This year, we’re looking forward to working with upstream Git developers and continuing to improve the performance and efficiency of workflows for large repositories in future releases," Blau said.