提交 ff132a19 编写于 作者: J Junio C Hamano

Merge branch 'tb/checkout-doc' into maint

Doc update.

* tb/checkout-doc:
  git-checkout.txt: document "git checkout <pathspec>" better
...@@ -3,7 +3,7 @@ git-checkout(1) ...@@ -3,7 +3,7 @@ git-checkout(1)
NAME NAME
---- ----
git-checkout - Checkout a branch or paths to the working tree git-checkout - Switch branches or restore working tree files
SYNOPSIS SYNOPSIS
-------- --------
...@@ -89,6 +89,10 @@ Omitting <branch> detaches HEAD at the tip of the current branch. ...@@ -89,6 +89,10 @@ Omitting <branch> detaches HEAD at the tip of the current branch.
(i.e. commit, tag or tree) to update the index for the given (i.e. commit, tag or tree) to update the index for the given
paths before updating the working tree. paths before updating the working tree.
+ +
'git checkout' with <paths> or `--patch` is used to restore modified or
deleted paths to their original contents from the index or replace paths
with the contents from a named <tree-ish> (most often a commit-ish).
+
The index may contain unmerged entries because of a previous failed merge. The index may contain unmerged entries because of a previous failed merge.
By default, if you try to check out such an entry from the index, the By default, if you try to check out such an entry from the index, the
checkout operation will fail and nothing will be checked out. checkout operation will fail and nothing will be checked out.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册