Git 2.23 Offers Significant Updates
Earlier this month, Git 2.23 was released, containing some impressive new features that can make your daily development life much easier.
Join the DZone community and get the full member experience.Join For Free
Earlier this month, Git 2.23 was released, containing some impressive new features. A few are noted here — which can make your daily development life much easier. Let's take a look.
In early August, Git 2.23 was released, which provides:
- Over 20 new features
- 20 performance improvements
- Over 45 fixes since Git 2.22
The changes were completed by 77 contributors, which 26 of them where first-time contributors to the project. Below are some key items I wanted to pass along.
Three features introduced in Git 2.23 that I wanted to pass along are as follows:
git merge" learned "
--quit" option that cleans up the in-progress merge while leaving the working tree and the index still in a mess.
git fetch" and "
git pull" reports when a fetch results in non-fast-forward updates to let the user notice unusual situation. The commands learned "
--no-show-forced-updates" option to disable this safety feature.
- Two new commands "
git switch" and "
git restore" are introduced to split "checking out a branch to work on advancing its history" and "checking out paths out of the index and/or a tree-ish to work on advancing the current history" out of the single "git checkout" command.
Three performance improvements introduced in Git 2.23 that I felt were worthwhile to mention are noted below:
- git update-server-info" learned not to rewrite the file with the same contents.
- "git fetch" that grabs from a group of remotes learned to run the auto-gc only once at the very end.
- When one step in multi-step cherry-pick or revert is reset or committed, the command line prompt script failed to notice the current status, which has been improved.
Fixes Since Git 2.22
Finally, three notable fixes since Git 2.22 are listed below:
- A relative pathname given to "
git init --template=<path><repo>" ought to be relative to the directory "
git init" gets invoked in, but it, instead, was made relative to the repository, which has been corrected.
- A "
merge -c" instruction during "
git rebase --rebase-merges" should give the user a chance to edit the log message, even when there is, otherwise, no need to create a new merge and replace the existing one (i.e. fast-forward instead), but did not. Which has been corrected.
git merge --squash" is designed to update the working tree and the index without creating the commit, and this cannot be countermanded by adding the "
--commit" option; the command now refuses to work when both options are given.
Since I was using Git 2.12, I found the upgrade a worthwhile investment of my time. Using one of my personal repositories, I have been working through all of the new features to gain a better understanding of them — since my project-based usage of Git is someone limited.
For more information about the Git 2.23 release, please check out the full release notes here.
Have a really great day!
Opinions expressed by DZone contributors are their own.