Re: [PATCH] git-checkout: disable guides how to switch branches with ui.guide
- From
Junio C Hamano <junkio@cox.net>
- Date
- Feb 1, 2007, 21:06 UTC
- Message-ID
- <7vabzxoaed.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <20070201205145.GA13439@moooo.ath.cx>
Matthias Lederhofer <matled@gmx.net> writes:
Show 7 quoted lines
> Junio C Hamano <junkio@cox.net> wrote: >> The original hope was after a few times one would know to use >> either -f or -b depending on what he wants, and would not run >> plain vanilla branch switching "git checkout master". > What is the point in detached heads if the user should start using -b > after a few times? I think detached heads are useful, so I will not > use -b with it.
The error message you quoted is given when your head is detached and you tried the regular "checkout an existing branch" -- which will lose where your detached HEAD currently is. You either say "it's OK to lose it because I am done with it and I do not need to keep it anymore" with "-f", or you say "I am done with this detached state for now, but I know I need to revisit it later" with "-b".
So if you will not use -b with it to discard a temporary state that is detached HEAD, that is perfectly fine. Detached head is useful.