@matheusbsbs / matheus-bagliano / commits / 0a5761746c
Fork 0

checkout: make the message about the need for a new branch a bit clearer

Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>

Nicolas Pitre committed Dec 22, 2006 at 15:06 UTC 0a5761746ca046d546da6afc2b0079706a6629e0
1 file changed +5 -2
git-checkout.sh
+5 -2
@@ -146,8 +146,11 @@ fi
146
147 [ -z "$branch$newbranch" ] &&
148 [ "$new" != "$old" ] &&
149 - die "git checkout: to checkout the requested commit you need to specify
150 - a name for a new branch which is created and switched to"
149 + die "git checkout: provided reference cannot be checked out directly
150 +
151 + You need -b to associate a new branch with the wanted checkout. Example:
152 + git checkout -b <new_branch_name> $arg
153 +"
154
155 if [ "X$old" = X ]
156 then