git-switch history and checkout compatibility

Started by Namikaze Minato on Jun 28, 2023

open the first message on its own page

Message details and related content
Hello,

I have been waiting for people to report this but it never came so I'm doing it:

I have trouble with getting used to git-switch instead of
git-checkout, but have even more trouble to get people to adopt it.

Please consider the two following git-switch statements:

git switch remote/branch # fatal: a branch is expected, got remote
branch 'remote/branch'
#and
git switch -d remote/branch
git switch master
git switch - # fatal: a branch is expected, got commit 'commit_id_here'

Both as retro-compatibility with checkout and for user-friendliness, I
would expect both to work.
Maybe a setting checkout.autoDetach could control such behavior if the
current implementation should be kept?

What do you think?

Kind regards,
Minato
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help