X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=Documentation%2Fgit-stash.txt;h=43af38aa4bd7673bef2127058f171da039732c71;hb=96790ca02935791b302cd65a4d092f4cdf5cd21e;hp=79abc38e50a9a82243085383401b2d93468efaf3;hpb=7eacaeffd7c2cda1a50a643a7c0c144fea01c76f;p=git.git diff --git a/Documentation/git-stash.txt b/Documentation/git-stash.txt index 79abc38e5..43af38aa4 100644 --- a/Documentation/git-stash.txt +++ b/Documentation/git-stash.txt @@ -13,7 +13,8 @@ SYNOPSIS 'git stash' drop [-q|--quiet] [] 'git stash' ( pop | apply ) [--index] [-q|--quiet] [] 'git stash' branch [] -'git stash' [save [--patch] [-k|--[no-]keep-index] [-q|--quiet] []] +'git stash' [save [--patch] [-k|--[no-]keep-index] [-q|--quiet] + [-u|--include-untracked] [-a|--all] []] 'git stash' clear 'git stash' create @@ -42,7 +43,7 @@ is also possible). OPTIONS ------- -save [--patch] [--[no-]keep-index] [-q|--quiet] []:: +save [-p|--patch] [--[no-]keep-index] [-u|--include-untracked] [-a|--all] [-q|--quiet] []:: Save your local modifications to a new 'stash', and run `git reset --hard` to revert them. The part is optional and gives @@ -54,12 +55,18 @@ save [--patch] [--[no-]keep-index] [-q|--quiet] []:: If the `--keep-index` option is used, all changes already added to the index are left intact. + -With `--patch`, you can interactively select hunks from in the diff +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 of your repository, and its worktree contains only the changes you selected interactively. The selected changes are then rolled back -from your worktree. +from your worktree. See the ``Interactive Mode'' section of +linkgit:git-add[1] to learn how to operate the `\--patch` mode. + The `--patch` option implies `--keep-index`. You can use `--no-keep-index` to override this.