From 696acf45f9638b014c7132508de26d1a571c8a33 Mon Sep 17 00:00:00 2001 From: Thomas Rast Date: Sat, 17 Jan 2009 17:09:56 +0100 Subject: checkout: implement "-" abbreviation, add docs and tests Have '-' mean the same as '@{-1}', i.e., the last branch we were on. Signed-off-by: Thomas Rast Signed-off-by: Junio C Hamano --- Documentation/git-checkout.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Documentation/git-checkout.txt') diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt index 9cd51514db..3bccffae62 100644 --- a/Documentation/git-checkout.txt +++ b/Documentation/git-checkout.txt @@ -133,6 +133,10 @@ the conflicted merge in the specified paths. + When this parameter names a non-branch (but still a valid commit object), your HEAD becomes 'detached'. ++ +As a special case, the "`@\{-N\}`" syntax for the N-th last branch +checks out the branch (instead of detaching). You may also specify +"`-`" which is synonymous with "`@\{-1\}`". Detached HEAD -- cgit v1.2.3