Thread (1 message) 1 message, 1 author, 2016-06-15

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

From: Junio C Hamano <hidden>
Date: 2016-06-15 23:02:00

Michael J Gruber [off-list ref] writes:
quoted
+	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?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help