Junio C Hamano  committed fcb10a9

git-stash: make "save" the default action again.

Signed-off-by: Junio C Hamano <>

  • Participants
  • Parent commits 5be6007

Comments (0)

Files changed (2)

File Documentation/git-stash.txt

-Use 'git-stash save' when you want to record the current state of the
+Use 'git-stash' when you want to record the current state of the
 working directory and the index, but want to go back to a clean
 working directory.  The command saves your local modifications away
 and reverts the working directory to match the `HEAD` commit.
 `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
 The latest stash you created is stored in `$GIT_DIR/refs/stash`; older
 stashes are found in the reflog of this reference and can be named using
 	Save your local modifications to a new 'stash', and run `git-reset
-	--hard` to revert them.
+	--hard` to revert them.  This is the default action when no
+	subcommand is given.


 # Main command set
 case "$1" in
-list | '')
-	test $# -gt 0 && shift
+	shift
 	if test $# = 0
 		set x -n 10
+save | '')
 	save_stash && git-reset --hard