From: Junio C Hamano Date: Wed, 23 Jul 2014 17:46:01 GMT Subject: Re: [PATCH 3/5] checkout --to: no auto-detach if the ref is already checked out Message-ID: In-Reply-To: <53CFBD2A.9030803@drmicha.warpmail.net> Michael J Gruber 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?