summaryrefslogtreecommitdiffstats
path: root/git-stash.html
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-03-10 15:02:36 -0800
committerJunio C Hamano <gitster@pobox.com>2017-03-10 15:02:36 -0800
commit53eec4d7df316d46d4de248964486ecfbcda0c99 (patch)
treeca3f2544626ab474fbdff9eea2020b373633b22e /git-stash.html
parentcbe0eb29622a497f18818e4481f27636446b86d7 (diff)
downloadgit-htmldocs-53eec4d7df316d46d4de248964486ecfbcda0c99.tar.gz
Autogenerated HTML docs for v2.12.0-244-g62556
Diffstat (limited to 'git-stash.html')
-rw-r--r--git-stash.html27
1 files changed, 20 insertions, 7 deletions
diff --git a/git-stash.html b/git-stash.html
index 726103777..85f24ffd9 100644
--- a/git-stash.html
+++ b/git-stash.html
@@ -753,8 +753,11 @@ git-stash(1) Manual Page
<em>git stash</em> drop [-q|--quiet] [&lt;stash&gt;]
<em>git stash</em> ( pop | apply ) [--index] [-q|--quiet] [&lt;stash&gt;]
<em>git stash</em> branch &lt;branchname&gt; [&lt;stash&gt;]
-<em>git stash</em> [save [-p|--patch] [-k|--[no-]keep-index] [-q|--quiet]
- [-u|--include-untracked] [-a|--all] [&lt;message&gt;]]
+<em>git stash</em> save [-p|--patch] [-k|--[no-]keep-index] [-q|--quiet]
+ [-u|--include-untracked] [-a|--all] [&lt;message&gt;]
+<em>git stash</em> [push [-p|--patch] [-k|--[no-]keep-index] [-q|--quiet]
+ [-u|--include-untracked] [-a|--all] [-m|--message &lt;message&gt;]]
+ [--] [&lt;pathspec&gt;&#8230;]]
<em>git stash</em> clear
<em>git stash</em> create [&lt;message&gt;]
<em>git stash</em> store [-m|--message &lt;message&gt;] [-q|--quiet] &lt;commit&gt;</pre>
@@ -791,16 +794,26 @@ stash index (e.g. the integer <code>n</code> is equivalent to <code>stash@{n}</c
<dt class="hdlist1">
save [-p|--patch] [-k|--[no-]keep-index] [-u|--include-untracked] [-a|--all] [-q|--quiet] [&lt;message&gt;]
</dt>
+<dt class="hdlist1">
+push [-p|--patch] [-k|--[no-]keep-index] [-u|--include-untracked] [-a|--all] [-q|--quiet] [-m|--message &lt;message&gt;] [--] [&lt;pathspec&gt;&#8230;]
+</dt>
<dd>
<p>
Save your local modifications to a new <em>stash</em> and roll them
back to HEAD (in the working tree and in the index).
The &lt;message&gt; part is optional and gives
- the description along with the stashed state. For quickly making
- a snapshot, you can omit <em>both</em> "save" and &lt;message&gt;, but giving
- only &lt;message&gt; does not trigger this action to prevent a misspelled
- subcommand from making an unwanted stash.
+ the description along with the stashed state.
</p>
+<div class="paragraph"><p>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 <code>stash -p</code> which acts as alias for <code>stash push -p</code> and pathspecs,
+which are allowed after a double hyphen <code>--</code> for disambiguation.</p></div>
+<div class="paragraph"><p>When pathspec is given to <em>git stash push</em>, the new stash records the
+modified states only for the files that match the pathspec. The index
+entries and working tree files are then rolled back to the state in
+HEAD only for these files, too, leaving files that do not match the
+pathspec intact.</p></div>
<div class="paragraph"><p>If the <code>--keep-index</code> option is used, all changes already added to the
index are left intact.</p></div>
<div class="paragraph"><p>If the <code>--include-untracked</code> option is used, all untracked files are also
@@ -1085,7 +1098,7 @@ xargs git log --merges --no-walk --grep=WIP</code></pre>
<div id="footnotes"><hr /></div>
<div id="footer">
<div id="footer-text">
-Last updated 2017-02-15 15:17:51 PST
+Last updated 2017-03-10 15:02:29 PST
</div>
</div>
</body>