The new version of the version control system , Git 2.26.0, is now available , bringing with it several new features , experimental support, and, most importantly, optimizations. For those unfamiliar with Git, it's one of the most popular, reliable, and high-performance version control systems , providing flexible, non-linear development tools based on branching and merging.
To ensure the integrity of the history and resistance to retrospective changes, the implicit hash of the entire previous history is used in each commit; it is also possible to digitally sign the developers of individual tags and commits.
Compared to the previous release, the new version adopted 504 changes prepared with the participation of 64 developers, 12 of whom participated in the development for the first time.
Git 2.26.0 Key New Features
This new version transitions the default to version 2 of the Git communication protocol , which is used when connecting a client remotely to a Git server. Version 2 is notable for providing the ability to filter branches and tags on the server side, returning a condensed list of links to the client.
Another important innovation is the ability to add new features to the protocol as new features become available in the toolkit. The client code remains compatible with the previous protocol and can continue to function with both new and old servers, automatically reverting to the first version if the server does not support the second.
The option "–Show-scope« has been added to the command «gitconfig", what simplifies the identification of the place where certain configurations are defined.
Git allows you to define configurations in different places: in the repository (.git / info / config), in the user's directory (~ / .gitconfig), in the system-wide configuration file (/ etc / gitconfig), as well as through command line options and environment variables.
When running ` git config` , it's quite difficult to understand exactly where the desired configuration is defined. The ` --show-origin` option was available to solve this problem, but it only shows the path to the file where the configuration is defined, which is useful if you intend to edit the file, but not helpful if you need to change the value through `git config` using the `--system`, `--global`, or `--local` options.
On the other hand, the announcement of this new version mentions that the extension of experimental support for partial clones was continued , allowing the transfer of only a portion of the data and working with an incomplete copy of the repository.
The new version adds a new command, "git sparse-checkout add" , which allows you to add separate directories to apply the " checkout " operation only to part of the working tree, instead of listing all those directories at once through the command " git sparse-checkout set ".
The performance of the " git grep " command, which is used to search both the actual contents of the repository and historical revisions, increases significantly.
To speed up searching, scanning the working tree using multiple threads (" git grep --threads ") was allowed, but searching historical revisions was single-threaded. This restriction has now been removed due to the implementation of the ability to parallelize object store read operations .
By default, the number of threads is set equal to the number of CPU cores, which in most cases now does not require explicit configuration of the " --threads " option.
Added support for autocompletion of subcommand input , paths, links and other arguments of the "git worktree" command, which allows working with multiple working copies of the repository.
We can also find the new version of the fsmonitor-watchman script , which provides integration with the Facebook Watchman mechanism to speed up tracking file changes and the appearance of new files. After updating Git, you must replace the hook in the repository.
If you want to learn more about this new release, you can consult the original article at the following link.