git-checkout.txt: better docs for '--patch'
Describe '-p' as a short form of '--patch' in synopsis and options. Also refer the reader to the patch mode description of git-add documentation. Helped-by: Jeff King <peff@peff.net> Mentored-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Valentin Haenel <valentin.haenel@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Valentin Haenel committed
May 5, 2011 at 20:48 UTC
a31538e273bbca23951fa70a0324ac49214d0f10
1 file changed
+4
-3
Documentation/git-checkout.txt
+4
-3
@@ -12,7 +12,7 @@ SYNOPSIS
12
'git checkout' [-q] [-f] [-m] [--detach] [<commit>]
13
'git checkout' [-q] [-f] [-m] [[-b|-B|--orphan] <new_branch>] [<start_point>]
14
'git checkout' [-f|--ours|--theirs|-m|--conflict=<style>] [<tree-ish>] [--] <paths>...
15
-'git checkout' --patch [<tree-ish>] [--] [<paths>...]
15
+'git checkout' [-p|--patch] [<tree-ish>] [--] [<paths>...]
16
17
DESCRIPTION
18
-----------
@@ -45,7 +45,7 @@ $ git checkout <branch>
45
that is to say, the branch is not reset/created unless "git checkout" is
46
successful.
47
48
-'git checkout' [--patch] [<tree-ish>] [--] <pathspec>...::
48
+'git checkout' [-p|--patch] [<tree-ish>] [--] <pathspec>...::
49
50
When <paths> or `--patch` are given, 'git checkout' does *not*
51
switch branches. It updates the named paths in the working tree
@@ -183,7 +183,8 @@ the conflicted merge in the specified paths.
183
working tree (and if a <tree-ish> was specified, the index).
184
+
185
This means that you can use `git checkout -p` to selectively discard
186
-edits from your current working tree.
186
+edits from your current working tree. See the ``Interactive Mode''
187
+section of linkgit:git-add[1] to learn how to operate the `\--patch` mode.
188
189
<branch>::
190
Branch to checkout; if it refers to a branch (i.e., a name that,