From: Jonathan Nieder Date: Tue, 08 Feb 2011 00:52:53 GMT Subject: [PATCH/WIP] checkout: introduce --detach synonym for "git checkout foo^{commit}" Message-ID: <20110208005238.GB24340@elie> In-Reply-To: <20110207234526.GA28336@sigill.intra.peff.net> 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, tests from Jeff King. Suggested-by: Jeff King Signed-off-by: Jonathan Nieder --- Jeff King wrote: > Jonathan, do you want to roll all of these up into a single patch? Okay, here it is. Two of the new tests fail. :) Documentation/git-checkout.txt | 13 +++++- builtin/checkout.c | 8 +++- t/t2020-checkout-detach.sh | 89 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 107 insertions(+), 3 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=