From: Matthieu Moy Date: Mon, 06 Apr 2009 20:45:22 GMT Subject: [PATCH 2/2] git-checkout.txt: clarify that applies when no path is given. Message-ID: <1239050722-1227-2-git-send-email-Matthieu.Moy@imag.fr> In-Reply-To: <1239050722-1227-1-git-send-email-Matthieu.Moy@imag.fr> Otherwise, the sentence "Defaults to HEAD." can be mis-read to mean that "git checkout -- hello.c" checks-out from HEAD. Signed-off-by: Matthieu Moy --- This may be a bit too verbose, but I've been biten by this (reading the doc not carrefully enough, I really thought git checkout would take HEAD, then I thought it was actually a documentation bug, and then I realized I miss-read). This patch would have saved me time. But if other disagree, I won't fight ;-). Documentation/git-checkout.txt | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt index 0b5485b..58bf508 100644 --- a/Documentation/git-checkout.txt +++ b/Documentation/git-checkout.txt @@ -126,9 +126,14 @@ the conflicted merge in the specified paths. :: Name for the new branch. +:: + Tree to checkout from (when path are given). If not specified, + the index will be used. + :: - Branch to checkout; may be any object ID that resolves to a - commit. Defaults to HEAD. + Branch to checkout (when no path are given); may be any object + ID that resolves to a commit. Defaults to HEAD. + + When this parameter names a non-branch (but still a valid commit object), your HEAD becomes 'detached'. -- 1.6.2.1.427.g061ea