Git 2.22 is out to improve dev productivity

Git 2.22 is out to improve dev productivity

Repository management tool Git has been released in v2.22, bringing new commands, configurations, and a couple of bug fixes to make dev’s life easier.

Users can now for example create a branch from the merge base of two other branches, since the branch and checkout -b commands are now able to understand the triple-dot merge base syntax (e.g. git branch new A…B).  

To make command line completion more useful, the Git team has taught the tool more subcommand parameters which it can now complete. Repository specific settings are being taken into account by the completion helper, and there are new configuration variables that can be used to override user.{name,email} if necessary.

Git branch got the very helpful –show-current to learn which branch you have currently checked out. This should facilitate orientation within repos, while git difftool can now run outside of repositories.

The latter as well as the mergetool have also been updated so that “the combinations of {diff,merge}.{tool,guitool} configuration variables serve as fallback settings of each other in a sensible order.” Users of Sublime merge will be interested to learn that the git client is one of the backends offered by mergetool in Git 2.22.

For those holding on to the –preserve-merges option in git rebase, it’s time to let go, since it has been deprecated in the latest release. To keep the structure of changes and make the most of interactivity, users should change to the –rebase-merges option, which has been around since the 2.18 release.

Other than that, the diff machinery is currently being reworked to use the parse-options API instead of its complex option parser, and the same goes for the command line parser of git commit-tree. Speaking of rewrites, git stash is now a pure C implementation which should improve performance amongst other things.

The test framework is now meant to be able to run most of the tests under different versions of over-the-wire protocols. More details concerning the internal implementation of Git can be found in the release notes.