git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 2/5] user-manual: mention git stash

From
JFJ. Bruce Fields <bfields@citi.umich.edu>
Date
Aug 6, 2007, 04:33 UTC
Message-ID
<18328.9634449922$1186374869@news.gmane.org>
In-Reply-To
<1186374842108-git-send-email->
From: Junio C Hamano <gitster@pobox.com>

Mention the git-stash command as a way to temporarily set aside work in progress.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
---
 Documentation/user-manual.txt |   32 ++++++++++++++++++++++++++++++++
 1 files changed, 32 insertions(+), 0 deletions(-)
diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
index c0820e9..9efe85c 100644
--- a/Documentation/user-manual.txt
+++ b/Documentation/user-manual.txt
@@ -1484,6 +1484,38 @@ $ git show HEAD^:path/to/file
 
 which will display the given version of the file.
 
+[[interrupted-work]]
+Temporarily setting aside work in progress
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+While you are in the middle of working on something complicated, you
+find an unrelated but obvious and trivial bug.  You would like to fix it
+before continuing.  You can use gitlink:git-stash[1] to save the current
+state of your work, and after fixing the bug (or, optionally after doing
+so on a different branch and then coming back), unstash the
+work-in-progress changes.
+
+------------------------------------------------
+$ git stash "work in progress for foo feature"
+------------------------------------------------
+
+This command will save your changes away to the `stash`, and
+reset your working tree and the index to match the tip of your
+current branch.  Then you can make your fix as usual.
+
+------------------------------------------------
+... edit and test ...
+$ git commit -a -m "blorpl: typofix"
+------------------------------------------------
+
+After that, you can go back to what you were working on with
+`git stash apply`:
+
+------------------------------------------------
+$ git stash apply
+------------------------------------------------
+
+
 [[ensuring-good-performance]]
 Ensuring good performance
 -------------------------
-- 
1.5.3.GIT
Previous: J. Bruce FieldsNext: J. Bruce Fields
Message 2 of 5 in “user-manual: update for new default --track behavior”
  1. 1/5 user-manual: update for new default --track behaviorJ. Bruce Fields, Aug 6, 2007
  2. 2/5 user-manual: mention git stashJ. Bruce Fields, Aug 6, 2007
  3. 3/5 user-manual: mention git-guiJ. Bruce Fields, Aug 6, 2007
  4. 4/5 documentation: use the word "index" in the git-add manual pageJ. Bruce Fields, Aug 6, 2007
  5. 5/5 documentation: use the word "index" in the git-commit man pageJ. Bruce Fields, Aug 6, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.