@@ -13,8 +13,6 @@ SYNOPSIS
13
13
'git stash' drop [-q|--quiet] [<stash>]
14
14
'git stash' ( pop | apply ) [--index] [-q|--quiet] [<stash>]
15
15
'git stash' branch <branchname> [<stash>]
16
- 'git stash' save [-p|--patch] [-k|--[no-]keep-index] [-q|--quiet]
17
- [-u|--include-untracked] [-a|--all] [<message>]
18
16
'git stash' [push [-p|--patch] [-k|--[no-]keep-index] [-q|--quiet]
19
17
[-u|--include-untracked] [-a|--all] [-m|--message <message>]]
20
18
[--] [<pathspec>...]]
@@ -33,7 +31,7 @@ and reverts the working directory to match the `HEAD` commit.
33
31
The modifications stashed away by this command can be listed with
34
32
`git stash list`, inspected with `git stash show`, and restored
35
33
(potentially on top of a different commit) with `git stash apply`.
36
- Calling `git stash` without any arguments is equivalent to `git stash save `.
34
+ Calling `git stash` without any arguments is equivalent to `git stash push `.
37
35
A stash is by default listed as "WIP on 'branchname' ...", but
38
36
you can give a more descriptive message on the command line when
39
37
you create one.
@@ -48,7 +46,6 @@ stash index (e.g. the integer `n` is equivalent to `stash@{n}`).
48
46
OPTIONS
49
47
-------
50
48
51
- save [-p|--patch] [-k|--[no-]keep-index] [-u|--include-untracked] [-a|--all] [-q|--quiet] [<message>]::
52
49
push [-p|--patch] [-k|--[no-]keep-index] [-u|--include-untracked] [-a|--all] [-q|--quiet] [-m|--message <message>] [--] [<pathspec>...]::
53
50
54
51
Save your local modifications to a new 'stash entry' and roll them
@@ -87,6 +84,12 @@ linkgit:git-add[1] to learn how to operate the `--patch` mode.
87
84
The `--patch` option implies `--keep-index`. You can use
88
85
`--no-keep-index` to override this.
89
86
87
+ save [-p|--patch] [-k|--[no-]keep-index] [-u|--include-untracked] [-a|--all] [-q|--quiet] [<message>]::
88
+
89
+ This option is deprecated in favour of 'git stash push'. It
90
+ differs from "stash push" in that it cannot take pathspecs,
91
+ and any non-option arguments form the message.
92
+
90
93
list [<options>]::
91
94
92
95
List the stash entries that you currently have. Each 'stash entry' is
@@ -118,7 +121,7 @@ pop [--index] [-q|--quiet] [<stash>]::
118
121
119
122
Remove a single stashed state from the stash list and apply it
120
123
on top of the current working tree state, i.e., do the inverse
121
- operation of `git stash save `. The working directory must
124
+ operation of `git stash push `. The working directory must
122
125
match the index.
123
126
+
124
127
Applying the state can fail with conflicts; in this case, it is not
@@ -137,7 +140,7 @@ apply [--index] [-q|--quiet] [<stash>]::
137
140
138
141
Like `pop`, but do not remove the state from the stash list. Unlike `pop`,
139
142
`<stash>` may be any commit that looks like a commit created by
140
- `stash save ` or `stash create`.
143
+ `stash push ` or `stash create`.
141
144
142
145
branch <branchname> [<stash>]::
143
146
@@ -148,7 +151,7 @@ branch <branchname> [<stash>]::
148
151
`stash@{<revision>}`, it then drops the `<stash>`. When no `<stash>`
149
152
is given, applies the latest one.
150
153
+
151
- This is useful if the branch on which you ran `git stash save ` has
154
+ This is useful if the branch on which you ran `git stash push ` has
152
155
changed enough that `git stash apply` fails due to conflicts. Since
153
156
the stash entry is applied on top of the commit that was HEAD at the
154
157
time `git stash` was run, it restores the originally stashed state
@@ -255,14 +258,14 @@ $ git stash pop
255
258
256
259
Testing partial commits::
257
260
258
- You can use `git stash save --keep-index` when you want to make two or
261
+ You can use `git stash push --keep-index` when you want to make two or
259
262
more commits out of the changes in the work tree, and you want to test
260
263
each change before committing:
261
264
+
262
265
----------------------------------------------------------------
263
266
# ... hack hack hack ...
264
267
$ git add --patch foo # add just first part to the index
265
- $ git stash save --keep-index # save all other changes to the stash
268
+ $ git stash push --keep-index # save all other changes to the stash
266
269
$ edit/build/test first part
267
270
$ git commit -m 'First part' # commit fully tested change
268
271
$ git stash pop # prepare to work on all other changes
0 commit comments