DEV Community

Karl Stolley
Karl Stolley

Posted on • Originally published at stolley.dev on

2

Breaking Down the Monolith of `git checkout` in Git 2.23

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 switchand git 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.

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay