From: Jonathan Nieder Date: Tue, 08 Feb 2011 10:32:49 GMT Subject: [PATCH 2/3] checkout: introduce --detach synonym for "git checkout foo^{commit}" Message-ID: <20110208103249.GC29660@elie> In-Reply-To: <20110208102605.GA29660@elie> From: Junio C Hamano For example, one might use this when making a temporary merge to test that two topics work well together. Patch by Junio, with tests from Jeff King. [jn: with some extra checks for bogus commandline usage] Suggested-by: Jeff King Signed-off-by: Junio C Hamano Signed-off-by: Jonathan Nieder --- Documentation/git-checkout.txt | 13 +++++- builtin/checkout.c | 25 ++++++++-- t/t2020-checkout-detach.sh | 95 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 126 insertions(+), 7 deletions(-) create mode 100755 t/t2020-checkout-detach.sh diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt index 22d3611..d162117 100644 --- a/Documentation/git-checkout.txt +++ b/Documentation/git-checkout.txt @@ -9,6 +9,7 @@ SYNOPSIS -------- [verse] 'git checkout' [-q] [-f] [-m] [] +'git checkout' [-q] [-f] [-m] [--detach] [] 'git checkout' [-q] [-f] [-m] [[-b|-B|--orphan] ] [] 'git checkout' [-f|--ours|--theirs|-m|--conflict=