Subject: Re: [PATCH 3/5] checkout --to: no auto-detach if the ref is already checked out

From: Junio C Hamano <[email-masked]>
Date: Wed, 23 Jul 2014 10:46:01 -0700

Michael J Gruber <[email-masked]> writes:

>> +	if (advice_checkout_to)
>> +		die(_("%s is already checked out at %s.\n"
>> +		      "Either use --detach or -b together with --to "
>> +		      "or switch branch in the the other checkout."),
>
> "or switch to a different branch in the other checkout". But maybe we
> can be even more helpful, like:
>
> "%s is already checked out at %s.\n"
> "Either checkout the detached head of branch %s using\n"
> "    git checkout --detach --to %s %s\n"
> "or checkout a new branch based off %s using\n"
> "    git checkout --to %s -b %s newbranch %s\n"
> "or switch to a different branch in the other checkout."
>
> if we can figure out the appropriate arguments at this point in the code.

Another possible alternative is "go and work there instead of
creating yet another checkout", but is that too obvious without
saying?