Great overview of the changes in Git 2.23, care of Taylor Blau on the GitHub.com blog:
Git 2.23 brings a new pair of experimental commands to the suite of existing ones:
git switch
andgit restore
. These two are meant to eventually provide a better interface for the well-knowngit checkout
. The new commands intend to each have a clear separation, neatly divvying up what the many responsibilities of git checkout, as weβll show below.
The perennially overloaded git checkout
command is a notable piece of difficult CLI in an already challenging suite. I can easily imagine myself tripping over the old flags, though, as in the comparable git checkout -b
and git switch -c
commands for immediately creating and checking out a branch. Because git checkout
is used in so many different contexts, itβs its flags and argument patterns that are most memorable to those who use Git every day.
Top comments (0)