From 26776c9737a6b5b0e7aab142aef6ba856d8b46ca Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Wed, 11 Sep 2013 10:05:17 -0700 Subject: checkout: update synopsys and documentation on detaching HEAD In the synopsis, the second form to detach HEAD at the named commit labelled the argument as ''. While this is technically more correct, because the feature to detach is not limited to the tip of a named branch, it was found confusing and did not express the fact that you have to give `--detach` if you are naming the commit you want to detach HEAD at with a branch name. Separate this case into two syntactical forms, mimicking the way how the DESCRIPTION section shows this usage. Also update the text that explains the syntax to name the commit to detach HEAD at to clarify. Suggested-by: Benjamin Bergman Helped-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- Documentation/git-checkout.txt | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt index ca118ac6bf..91294f89c8 100644 --- a/Documentation/git-checkout.txt +++ b/Documentation/git-checkout.txt @@ -9,7 +9,8 @@ SYNOPSIS -------- [verse] 'git checkout' [-q] [-f] [-m] [] -'git checkout' [-q] [-f] [-m] [--detach] [] +'git checkout' [-q] [-f] [-m] --detach [] +'git checkout' [-q] [-f] [-m] [--detach] 'git checkout' [-q] [-f] [-m] [[-b|-B|--orphan] ] [] 'git checkout' [-f|--ours|--theirs|-m|--conflict=