aboutsummaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-07-22 14:46:28 -0700
committerJunio C Hamano <gitster@pobox.com>2011-07-22 14:46:28 -0700
commit22f41286be2a07cf96d71a795eaee54b702bb570 (patch)
treea1470fd5467710edefcbdde997f41bb754fdf067 /Documentation
parent9c81e6421bca19ef779e84dbf9ebf148e1c1201f (diff)
parent787513027a7d0af3c2cd2f04b85bc7136d580586 (diff)
downloadgit-22f41286be2a07cf96d71a795eaee54b702bb570.tar.gz
git-22f41286be2a07cf96d71a795eaee54b702bb570.tar.xz
Merge branch 'dc/stash-con-untracked'
* dc/stash-con-untracked: stash: Add --include-untracked option to stash and remove all untracked files Conflicts: git-stash.sh
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/git-stash.txt10
1 files changed, 8 insertions, 2 deletions
diff --git a/Documentation/git-stash.txt b/Documentation/git-stash.txt
index 15f051fa4..43af38aa4 100644
--- a/Documentation/git-stash.txt
+++ b/Documentation/git-stash.txt
@@ -13,7 +13,8 @@ SYNOPSIS
'git stash' drop [-q|--quiet] [<stash>]
'git stash' ( pop | apply ) [--index] [-q|--quiet] [<stash>]
'git stash' branch <branchname> [<stash>]
-'git stash' [save [-p|--patch] [-k|--[no-]keep-index] [-q|--quiet] [<message>]]
+'git stash' [save [--patch] [-k|--[no-]keep-index] [-q|--quiet]
+ [-u|--include-untracked] [-a|--all] [<message>]]
'git stash' clear
'git stash' create
@@ -42,7 +43,7 @@ is also possible).
OPTIONS
-------
-save [-p|--patch] [--[no-]keep-index] [-q|--quiet] [<message>]::
+save [-p|--patch] [--[no-]keep-index] [-u|--include-untracked] [-a|--all] [-q|--quiet] [<message>]::
Save your local modifications to a new 'stash', and run `git reset
--hard` to revert them. The <message> part is optional and gives
@@ -54,6 +55,11 @@ save [-p|--patch] [--[no-]keep-index] [-q|--quiet] [<message>]::
If the `--keep-index` option is used, all changes already added to the
index are left intact.
+
+If the `--include-untracked` option is used, all untracked files are also
+stashed and then cleaned up with `git clean`, leaving the working directory
+in a very clean state. If the `--all` option is used instead then the
+ignored files are stashed and cleaned in addition to the untracked files.
++
With `--patch`, you can interactively select hunks from the diff
between HEAD and the working tree to be stashed. The stash entry is
constructed such that its index state is the same as the index state