From: Torsten Bögershausen Date: Mon, 08 Jun 2015 20:21:28 GMT Subject: [PATCH] git-checkout.txt: Document "git checkout " better Message-ID: <5575F948.4060400@web.de> git checkout can be used to revert changes in the working tree. Signed-off-by: Torsten Bögershausen --- My first attempt to improve the documentation Documentation/git-checkout.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt index d263a56..8cd018a 100644 --- a/Documentation/git-checkout.txt +++ b/Documentation/git-checkout.txt @@ -3,7 +3,7 @@ git-checkout(1) NAME ---- -git-checkout - Checkout a branch or paths to the working tree +git-checkout - Switch branches or reverts changes in the working tree SYNOPSIS -------- @@ -83,7 +83,8 @@ Omitting detaches HEAD at the tip of the current branch. When or `--patch` are given, 'git checkout' does *not* switch branches. It updates the named paths in the working tree from the index file or from a named (most often a - commit). In this case, the `-b` and `--track` options are + commit). Changes in files are discarded and deleted files are + restored. In this case, the `-b` and `--track` options are meaningless and giving either of them results in an error. The argument can be used to specify a specific tree-ish (i.e. commit, tag or tree) to update the index for the given -- 2.2.0.rc1.790.ge19fcd2