From: Nicolas Pitre Date: Fri, 22 Dec 2006 20:06:54 +0000 (-0500) Subject: checkout: make the message about the need for a new branch a bit clearer X-Git-Tag: v1.5.0-rc0~23 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=0a5761746ca046d546da6afc2b0079706a6629e0;p=git.git checkout: make the message about the need for a new branch a bit clearer Signed-off-by: Nicolas Pitre Signed-off-by: Junio C Hamano --- diff --git a/git-checkout.sh b/git-checkout.sh index 4192a99fe..92ec069a3 100755 --- a/git-checkout.sh +++ b/git-checkout.sh @@ -146,8 +146,11 @@ fi [ -z "$branch$newbranch" ] && [ "$new" != "$old" ] && - die "git checkout: to checkout the requested commit you need to specify - a name for a new branch which is created and switched to" + die "git checkout: provided reference cannot be checked out directly + + You need -b to associate a new branch with the wanted checkout. Example: + git checkout -b $arg +" if [ "X$old" = X ] then