Skip to content

Commit f2808a5

Browse files
escgitster
authored andcommitted
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 <[email protected]> Mentored-by: Junio C Hamano <[email protected]> Signed-off-by: Valentin Haenel <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent c105356 commit f2808a5

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

Documentation/git-stash.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ SYNOPSIS
1313
'git stash' drop [-q|--quiet] [<stash>]
1414
'git stash' ( pop | apply ) [--index] [-q|--quiet] [<stash>]
1515
'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>]]
1717
'git stash' clear
1818
'git stash' create
1919

@@ -42,7 +42,7 @@ is also possible).
4242
OPTIONS
4343
-------
4444

45-
save [--patch] [--[no-]keep-index] [-q|--quiet] [<message>]::
45+
save [-p|--patch] [--[no-]keep-index] [-q|--quiet] [<message>]::
4646

4747
Save your local modifications to a new 'stash', and run `git reset
4848
--hard` to revert them. The <message> part is optional and gives
@@ -54,12 +54,13 @@ save [--patch] [--[no-]keep-index] [-q|--quiet] [<message>]::
5454
If the `--keep-index` option is used, all changes already added to the
5555
index are left intact.
5656
+
57-
With `--patch`, you can interactively select hunks from in the diff
57+
With `--patch`, you can interactively select hunks from the diff
5858
between HEAD and the working tree to be stashed. The stash entry is
5959
constructed such that its index state is the same as the index state
6060
of your repository, and its worktree contains only the changes you
6161
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.
6364
+
6465
The `--patch` option implies `--keep-index`. You can use
6566
`--no-keep-index` to override this.

0 commit comments

Comments
 (0)