4 ms·
But "git switch --detach master" leaves you detached. So switch is just a dumber checkout that has to be told when to detach or not instead of inferring it fro
by kazinator 2y ago
But "git switch --detach master" leaves you detached.
So switch is just a dumber checkout that has to be told when to detach or not instead of inferring it from the kind of revision.
- remram 2y agoThat's usually a good thing, setting your HEAD to a symbolic ref or a commit are very different operations. Having a switch makes sense and probably catches beginner errors rather than letting them know afterwards. I don't feel like typing 'git s -d <branch>' has slowed me down in practice but you're technically right of course (or I would add a 'd="switch -d'"' alias).