aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Documentation/git-stash.txt13
-rwxr-xr-xgit-stash.sh8
2 files changed, 17 insertions, 4 deletions
diff --git a/Documentation/git-stash.txt b/Documentation/git-stash.txt
index 7d50d74cc..49e2296a2 100644
--- a/Documentation/git-stash.txt
+++ b/Documentation/git-stash.txt
@@ -8,11 +8,13 @@ git-stash - Stash the changes in a dirty working directory away
SYNOPSIS
--------
[verse]
-'git stash' list
-'git stash' (show | apply | drop | pop ) [<stash>]
+'git stash' list [<options>]
+'git stash' (show | drop | pop ) [<stash>]
+'git stash' apply [--index] [<stash>]
'git stash' branch <branchname> [<stash>]
-'git stash' [save [<message>]]
+'git stash' [save [--keep-index] [<message>]]
'git stash' clear
+'git stash' create
DESCRIPTION
-----------
@@ -116,6 +118,11 @@ pop [<stash>]::
of the current working tree state. When no `<stash>` is given,
`stash@\{0}` is assumed. See also `apply`.
+create::
+
+ Create a stash (which is a regular commit object) and return its
+ object name, without storing it anywhere in the ref namespace.
+
DISCUSSION
----------
diff --git a/git-stash.sh b/git-stash.sh
index 5ad2c4b7a..e15c12abc 100755
--- a/git-stash.sh
+++ b/git-stash.sh
@@ -1,7 +1,13 @@
#!/bin/sh
# Copyright (c) 2007, Nanako Shiraishi
-USAGE='[ | save | list | show | apply | clear | drop | pop | create | branch ]'
+dashless=$(basename "$0" | sed -e 's/-/ /')
+USAGE="list [<options>]
+ or: $dashless (show | drop | pop ) [<stash>]
+ or: $dashless apply [--index] [<stash>]
+ or: $dashless branch <branchname> [<stash>]
+ or: $dashless [save [--keep-index] [<message>]]
+ or: $dashless clear"
SUBDIRECTORY_OK=Yes
OPTIONS_SPEC=