git-stash.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
f2808a50a62755739a775ed008f01a9a5a053938
1 file changed
+5
-4
Documentation/git-stash.txt
+5
-4
@@ -13,7 +13,7 @@ SYNOPSIS
13
'git stash' drop [-q|--quiet] [<stash>]
14
'git stash' ( pop | apply ) [--index] [-q|--quiet] [<stash>]
15
'git stash' branch <branchname> [<stash>]
16
-'git stash' [save [--patch] [-k|--[no-]keep-index] [-q|--quiet] [<message>]]
16
+'git stash' [save [-p|--patch] [-k|--[no-]keep-index] [-q|--quiet] [<message>]]
17
'git stash' clear
18
'git stash' create
19
@@ -42,7 +42,7 @@ is also possible).
42
OPTIONS
43
-------
44
45
-save [--patch] [--[no-]keep-index] [-q|--quiet] [<message>]::
45
+save [-p|--patch] [--[no-]keep-index] [-q|--quiet] [<message>]::
46
47
Save your local modifications to a new 'stash', and run `git reset
48
--hard` to revert them. The <message> part is optional and gives
@@ -54,12 +54,13 @@ save [--patch] [--[no-]keep-index] [-q|--quiet] [<message>]::
54
If the `--keep-index` option is used, all changes already added to the
55
index are left intact.
56
+
57
-With `--patch`, you can interactively select hunks from in the diff
57
+With `--patch`, you can interactively select hunks from the diff
58
between HEAD and the working tree to be stashed. The stash entry is
59
constructed such that its index state is the same as the index state
60
of your repository, and its worktree contains only the changes you
61
selected interactively. The selected changes are then rolled back
62
-from your worktree.
62
+from your worktree. See the ``Interactive Mode'' section of
63
+linkgit:git-add[1] to learn how to operate the `\--patch` mode.
64
+
65
The `--patch` option implies `--keep-index`. You can use
66
`--no-keep-index` to override this.