git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] git-stash.txt: Add new example
@ 2010-05-05  7:37 jari.aalto
  2010-05-05 19:46 ` Junio C Hamano
  0 siblings, 1 reply; 6+ messages in thread
From: jari.aalto @ 2010-05-05  7:37 UTC (permalink / raw)
  To: git; +Cc: Jari Aalto

From: Jari Aalto <jari.aalto@cante.net>

Add new example "Saving selected files to stash" thanks to
ideas by Johan Sageryd <j416@1616.se>.

Signed-off-by: Jari Aalto <jari.aalto@cante.net>
---
 Documentation/git-stash.txt |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/Documentation/git-stash.txt b/Documentation/git-stash.txt
index 473889a..7d9f9e1 100644
--- a/Documentation/git-stash.txt
+++ b/Documentation/git-stash.txt
@@ -230,6 +230,18 @@ $ edit/build/test remaining parts
 $ git commit foo -m 'Remaining parts'
 ----------------------------------------------------------------
 
+Saving selected files to stash::
+
+You can use `git stash save --keep-index` to put only selected files
+into the stash. Let's suppose the files A, B, C and D are modified and
+you want to stash only C and D:
++
+----------------------------------------------------------------
+$ git status			# Verify what's modified
+$ git add A B			# ...not these
+$ git stash save --keep-index   # ...but stash all the others
+----------------------------------------------------------------
+
 Recovering stashes that were cleared/dropped erroneously::
 
 If you mistakenly drop or clear stashes, they cannot be recovered
-- 
1.7.0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-05-07 16:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-05  7:37 [PATCH] git-stash.txt: Add new example jari.aalto
2010-05-05 19:46 ` Junio C Hamano
2010-05-06  8:40   ` [PATCH v2] git-stash.txt: Add example "Using stash selectively" Jari Aalto
2010-05-06  9:04     ` Johannes Sixt
2010-05-07  8:50       ` [PATCH v3] " Jari Aalto
2010-05-07 16:11     ` [PATCH v2] " Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).