I'm trying to get myself to use it because it makes more sense for newcomers who are used to "switch" from one branch to another. It also makes more sense as an English sentence. I'm used to the many meanings of "checkout", but that's not necessarily a good thing.
"many" == "two" here. Yes, separating them into two distinct subcommands seems like a good idea, I didn't object to that. I just won't use it as long as it's marked experimental. Nothing worse than having to re-train muscle memory, should they really introduce breaking changes
Btw, "check out" is fine as long as you don't expect it to be the same as in other SCMs. As for english meaning, with git, it just refers to "checking out" files from the (local) repo to your working copy. Checking out a branch (or commit, e.g. by hash) corresponds to checking out lots of files in a single operation
I'd say so, but
- It's used to switch to an existing branch
- It's used to create a new branch
you could argue indeed whether that's conceptually the same or not. There's no "right" or "wrong" here, though.
It's used to revert changes in your working tree
by checking out a single file from the repo…
Only as a consequence of checking out a branch
it's used to resolve conflicts
Only if you want to resolve it by, uhm, checking out the original version of that file
It's used to go into the Git Twilight Zone, AKA "detached head" state
In git, a "branch" is just a persistent reference to an individual commit (and all of its child commits). So it makes sense that you can use a commit without a branch as well. In fact, that's how you'd start a new branch from some commit "in the past". Yep, it takes some time to get used to this kind of thinking, but again, it makes sense (and is essentially the same thing as checking out a branch, which translates to checking out its "HEAD" commit).
BTW, taking this last point into consideration, I actually don't think
switch
is the perfect name for that functionality in git. Think "switch" to a specific commit? Sounds slightly weird…
edit: all that said, yes, there's still a conceptual difference between "checking out" a commit (or branch) to "checking out" an individual file from whatever the current local HEAD points to. So yes, I still agree it's a good idea to separate them into two different subcommands