aboutsummaryrefslogtreecommitdiffstats
path: root/using-git.texinfo
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2013-08-22 10:38:07 +0200
committerMattias Andrée <maandree@operamail.com>2013-08-22 10:38:07 +0200
commit71d9c4ea88e161f3fb21b7478e7cf7b2d83f0d64 (patch)
tree927dd57dc1df6d9d985c496f5fbd387413ad6dba /using-git.texinfo
parenttypo (diff)
downloadusing-git-71d9c4ea88e161f3fb21b7478e7cf7b2d83f0d64.tar.gz
using-git-71d9c4ea88e161f3fb21b7478e7cf7b2d83f0d64.tar.bz2
using-git-71d9c4ea88e161f3fb21b7478e7cf7b2d83f0d64.tar.xz
the basics of the stash
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'using-git.texinfo')
-rw-r--r--using-git.texinfo42
1 files changed, 42 insertions, 0 deletions
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