|
|
Log in / Subscribe / Register

splitting git commits

splitting git commits

Posted Feb 12, 2026 17:47 UTC (Thu) by josh (subscriber, #17465)
In reply to: splitting git commits by alx.manpages
Parent article: Evolving Git for the next decade

> These days, 'git switch -c letstrythatagain' seems to be preferred, I think.

I genuinely find that confusing. `git checkout branchname` makes sense to me as the mechanism for "I want to check out this branch", and adding an option to create the branch makes sense to me as well. I could imagine wanting to change the option from `-b` to `-c`, but I personally feel like "switch" is not any clearer than "checkout".


to post comments

splitting git commits

Posted Feb 12, 2026 17:58 UTC (Thu) by alx.manpages (subscriber, #145117) [Link]

The problem with git-checkout(1) is that it has too much functionality, and thus is somewhat dangerous.

That's why they split its functionality into separate commands git-switch(1) and git-restore(1).

See <https://git.kernel.org/pub/scm/git/git.git/tree/Documenta...>.

At first, I was a bit confused, but I'm now accustomed to git-switch(1), and it feels natural.


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds