@@ -75,14 +75,22 @@ show [<stash>]::
7575 it will accept any format known to 'git-diff' (e.g., `git stash show
7676 -p stash@\{1}` to view the second most recent stash in patch form).
7777
78- apply [--index] [<stash>]::
78+ pop [<stash>]::
7979
80- Restore the changes recorded in the stash on top of the current
81- working tree state. When no `<stash>` is given, applies the latest
82- one. The working directory must match the index.
80+ Remove a single stashed state from the stash list and apply it
81+ on top of the current working tree state, i.e., do the inverse
82+ operation of `git stash save`. The working directory must
83+ match the index.
8384+
84- This operation can fail with conflicts; you need to resolve them
85- by hand in the working tree.
85+ Applying the state can fail with conflicts; in this case, it is not
86+ removed from the stash list. You need to resolve the conflicts by hand
87+ and call `git stash drop` manually afterwards.
88+ +
89+ When no `<stash>` is given, `stash@\{0}` is assumed. See also `apply`.
90+
91+ apply [--index] [<stash>]::
92+
93+ Like `pop`, but do not remove the state from the stash list.
8694+
8795If the `--index` option is used, then tries to reinstate not only the working
8896tree's changes, but also the index's ones. However, this can fail, when you
@@ -112,12 +120,6 @@ drop [<stash>]::
112120 Remove a single stashed state from the stash list. When no `<stash>`
113121 is given, it removes the latest one. i.e. `stash@\{0}`
114122
115- pop [<stash>]::
116-
117- Remove a single stashed state from the stash list and apply on top
118- of the current working tree state. When no `<stash>` is given,
119- `stash@\{0}` is assumed. See also `apply`.
120-
121123create::
122124
123125 Create a stash (which is a regular commit object) and return its
@@ -163,7 +165,7 @@ $ git pull
163165file foobar not up to date, cannot merge.
164166$ git stash
165167$ git pull
166- $ git stash apply
168+ $ git stash pop
167169----------------------------------------------------------------
168170
169171Interrupted workflow::
@@ -192,7 +194,7 @@ You can use 'git-stash' to simplify the above, like this:
192194$ git stash
193195$ edit emergency fix
194196$ git commit -a -m "Fix in a hurry"
195- $ git stash apply
197+ $ git stash pop
196198# ... continue hacking ...
197199----------------------------------------------------------------
198200
0 commit comments