@@ -75,14 +75,22 @@ show [<stash>]::
75
75
it will accept any format known to 'git-diff' (e.g., `git stash show
76
76
-p stash@\{1}` to view the second most recent stash in patch form).
77
77
78
- apply [--index] [<stash>]::
78
+ pop [<stash>]::
79
79
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.
83
84
+
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.
86
94
+
87
95
If the `--index` option is used, then tries to reinstate not only the working
88
96
tree's changes, but also the index's ones. However, this can fail, when you
@@ -112,12 +120,6 @@ drop [<stash>]::
112
120
Remove a single stashed state from the stash list. When no `<stash>`
113
121
is given, it removes the latest one. i.e. `stash@\{0}`
114
122
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
-
121
123
create::
122
124
123
125
Create a stash (which is a regular commit object) and return its
@@ -163,7 +165,7 @@ $ git pull
163
165
file foobar not up to date, cannot merge.
164
166
$ git stash
165
167
$ git pull
166
- $ git stash apply
168
+ $ git stash pop
167
169
----------------------------------------------------------------
168
170
169
171
Interrupted workflow::
@@ -192,7 +194,7 @@ You can use 'git-stash' to simplify the above, like this:
192
194
$ git stash
193
195
$ edit emergency fix
194
196
$ git commit -a -m "Fix in a hurry"
195
- $ git stash apply
197
+ $ git stash pop
196
198
# ... continue hacking ...
197
199
----------------------------------------------------------------
198
200
0 commit comments