Bug: `git switch --detach` gives inapplicable advice
- From
mirth hickford <mirth.hickford@gmail.com>
- Date
- Mar 30, 2024, 07:49 UTC
- Message-ID
- <CAKcCxfAVGr2QoaXiT81gVZ0mfq3zJs7TywRhJzevwKX7wChJ4w@mail.gmail.com>
Is this a bug? "Your branch can be fast-forwarded" doesn't apply to a detached HEAD.
> git switch main > git reset --hard origin/main~1 > git switch --detach main
HEAD is now at 5a07c3bde Refactor... Your branch is behind 'origin/main' by 1 commit, and can be fast-forwarded. (use "git pull" to update your local branch)
> git pull
You are not currently on a branch.