From 71d9c4ea88e161f3fb21b7478e7cf7b2d83f0d64 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Thu, 22 Aug 2013 10:38:07 +0200 Subject: the basics of the stash MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- using-git.texinfo | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) (limited to 'using-git.texinfo') diff --git a/using-git.texinfo b/using-git.texinfo index afa82dd..0b2393c 100644 --- a/using-git.texinfo +++ b/using-git.texinfo @@ -916,6 +916,7 @@ what you are doing. @menu * Naïve reset:: +* Using the stash:: @end menu @@ -938,6 +939,47 @@ mv REPOSITORY.new REPOSITORY +@node Using the stash +@section Using the stash + +The stash is a grate utility for storing +changes. If you have made changes in +the working directory or the index, you +can store them in the stash and both +the working directory and the index will +be restored to the @code{HEAD}. Keep +in mind the the naïve reset will discard +the stash because the stash is local. +Changes stored to the stash can be applied +to any branch and any later state of the +@code{HEAD}, that is what the stash is +made for. + +The basic stash operations include: + +@table @command +@item git stash +Store the changes made to the index and +working directory. + +@item git stash drop +Discard the object at the top of the +stash stack. + +@item git stash apply +Apply changes stored as the object at the +top of the stash stack. + +@item git stash pop +Synonym for +@command{git stash apply && git stash drop}. + +@item git stash clear +Discard all stored stash objects. +@end table + + + @node GNU Free Documentation License @appendix GNU Free Documentation License @include fdl.texinfo -- cgit v1.2.3-70-g09d2