aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/git-stash.txt
diff options
context:
space:
mode:
authorThomas Gummerer <t.gummerer@gmail.com>2017-02-28 20:33:40 +0000
committerJunio C Hamano <gitster@pobox.com>2017-02-28 14:21:10 -0800
commit9e140909f611fff720efc914b7186b8e4ab722cd (patch)
tree82d6ae0ad2a22e348cb3ceabb114fb066a7c32a4 /Documentation/git-stash.txt
parent1ada5020b38c520f665259f6d9b3955672b92761 (diff)
downloadgit-9e140909f611fff720efc914b7186b8e4ab722cd.tar.gz
stash: allow pathspecs in the no verb form
Now that stash_push is used in the no verb form of stash, allow specifying the command line for this form as well. Always use -- to disambiguate pathspecs from other non-option arguments. Also make git stash -p an alias for git stash push -p. This allows users to use git stash -p <pathspec>. Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-stash.txt')
-rw-r--r--Documentation/git-stash.txt11
1 files changed, 7 insertions, 4 deletions
diff --git a/Documentation/git-stash.txt b/Documentation/git-stash.txt
index 4d8d30f179..70191d06b6 100644
--- a/Documentation/git-stash.txt
+++ b/Documentation/git-stash.txt
@@ -54,10 +54,13 @@ push [-p|--patch] [-k|--[no-]keep-index] [-u|--include-untracked] [-a|--all] [-q
Save your local modifications to a new 'stash' and roll them
back to HEAD (in the working tree and in the index).
The <message> part is optional and gives
- the description along with the stashed state. For quickly making
- a snapshot, you can omit _both_ "save" and <message>, but giving
- only <message> does not trigger this action to prevent a misspelled
- subcommand from making an unwanted stash.
+ the description along with the stashed state.
++
+For quickly making a snapshot, you can omit "push". In this mode,
+non-option arguments are not allowed to prevent a misspelled
+subcommand from making an unwanted stash. The two exceptions to this
+are `stash -p` which acts as alias for `stash push -p` and pathspecs,
+which are allowed after a double hyphen `--` for disambiguation.
+
When pathspec is given to 'git stash push', the new stash records the
modified states only for the files that match the pathspec. The index