aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/git-stash.txt
diff options
context:
space:
mode:
authorThomas Gummerer <t.gummerer@gmail.com>2017-10-22 18:04:07 +0100
committerJunio C Hamano <gitster@pobox.com>2017-10-27 09:58:38 +0900
commitdb37745eef62c57e1609cbd50c6dbf9a8066f191 (patch)
tree83fd416319404fd187147e74ef3e6a8958ea4c90 /Documentation/git-stash.txt
parent4843cdefe3f30d19c1b2cf601522152c1413459a (diff)
downloadgit-db37745eef62c57e1609cbd50c6dbf9a8066f191.tar.gz
stash: replace "git stash save" with "git stash push" in the documentation
"git stash push" is the newer interface for creating a stash. While we are still keeping "git stash save" around for the time being, it's better to point new users of "git stash" to the more modern (and more feature rich) interface, instead of teaching them the older version that we might want to phase out in the future. Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-stash.txt')
-rw-r--r--Documentation/git-stash.txt12
1 files changed, 6 insertions, 6 deletions
diff --git a/Documentation/git-stash.txt b/Documentation/git-stash.txt
index 00f95fee1f..53b2e60aeb 100644
--- a/Documentation/git-stash.txt
+++ b/Documentation/git-stash.txt
@@ -33,7 +33,7 @@ and reverts the working directory to match the `HEAD` commit.
The modifications stashed away by this command can be listed with
`git stash list`, inspected with `git stash show`, and restored
(potentially on top of a different commit) with `git stash apply`.
-Calling `git stash` without any arguments is equivalent to `git stash save`.
+Calling `git stash` without any arguments is equivalent to `git stash push`.
A stash is by default listed as "WIP on 'branchname' ...", but
you can give a more descriptive message on the command line when
you create one.
@@ -118,7 +118,7 @@ pop [--index] [-q|--quiet] [<stash>]::
Remove a single stashed state from the stash list and apply it
on top of the current working tree state, i.e., do the inverse
- operation of `git stash save`. The working directory must
+ operation of `git stash push`. The working directory must
match the index.
+
Applying the state can fail with conflicts; in this case, it is not
@@ -137,7 +137,7 @@ apply [--index] [-q|--quiet] [<stash>]::
Like `pop`, but do not remove the state from the stash list. Unlike `pop`,
`<stash>` may be any commit that looks like a commit created by
- `stash save` or `stash create`.
+ `stash push` or `stash create`.
branch <branchname> [<stash>]::
@@ -148,7 +148,7 @@ branch <branchname> [<stash>]::
`stash@{<revision>}`, it then drops the `<stash>`. When no `<stash>`
is given, applies the latest one.
+
-This is useful if the branch on which you ran `git stash save` has
+This is useful if the branch on which you ran `git stash push` has
changed enough that `git stash apply` fails due to conflicts. Since
the stash entry is applied on top of the commit that was HEAD at the
time `git stash` was run, it restores the originally stashed state
@@ -255,14 +255,14 @@ $ git stash pop
Testing partial commits::
-You can use `git stash save --keep-index` when you want to make two or
+You can use `git stash push --keep-index` when you want to make two or
more commits out of the changes in the work tree, and you want to test
each change before committing:
+
----------------------------------------------------------------
# ... hack hack hack ...
$ git add --patch foo # add just first part to the index
-$ git stash save --keep-index # save all other changes to the stash
+$ git stash push --keep-index # save all other changes to the stash
$ edit/build/test first part
$ git commit -m 'First part' # commit fully tested change
$ git stash pop # prepare to work on all other changes