X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=Documentation%2Fgit-checkout.txt;h=3bccffae628e065a6cd92155a9283d5710991fd7;hb=de8139005f04a4a5ad8a54c771475803594028cd;hp=168333a588e0828d2d14687774fd41cc57f43721;hpb=90c3302173c5a02189f5fe9091c0d07f7b7ebe89;p=git.git diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt index 168333a58..3bccffae6 100644 --- a/Documentation/git-checkout.txt +++ b/Documentation/git-checkout.txt @@ -27,7 +27,7 @@ the first namespace level. When are given, this command does *not* switch branches. It updates the named paths in the working tree from -the index file, or from a named commit. In +the index file, or from a named (most often a commit). In this case, the `-b` options is meaningless and giving either of them results in an error. argument can be used to specify a specific tree-ish (i.e. commit, tag or tree) @@ -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 @@ -232,7 +236,6 @@ the `-m` option, you would see something like this: ------------ $ git checkout -m mytopic Auto-merging frotz -merge: warning: conflicts during merge ERROR: Merge conflict in frotz fatal: merge program failed ------------