git-switch history and checkout compatibility
- From
- Namikaze Minato <lloydsensei+git@gmail.com>
- Date
- Jun 28, 2023, 13:03 UTC
- Message-ID
- <CACmJb3xWh+0BR_V6sxfMK7iMSdWfvY9d2rjt1hnZhFw70zWweA@mail.gmail.com>
- In-Reply-To
- <CACmJb3yoHagaU1wb4qRT-nZV4Wptao8boaUXCAYrFxfrxcmUYg@mail.gmail.com>
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