git stash save 有什么作用而 git stash 没有,你会在什么情况下使用它?

what does git stash save do that git stash does not do and in what circumstance would you use it?

我使用 git stash 合理的数量,然后 git stash pop 重新应用我的更改,通常是当我想从远程拉取而不丢失我的更改时。

但我看到命令 git stash save 以类似的方式使用,在阅读 git 文档后,我对它的作用并不了解 git stash 没有做。

有人可以向我解释一下它的作用吗? (请假设我是一个简单的人:)

git stash --help 说:

Calling git stash without any arguments is equivalent to git stash save.

git help stash中的大纲显示:

   git stash [save [-p|--patch] [-k|--[no-]keep-index] [-q|--quiet]
                [-u|--include-untracked] [-a|--all] [<message>]]

这意味着,如果您使用 save 选项,您还可以指定其他选项,例如要使用的消息,但如果您只说 git stash,则与 save 相同别无选择。

save 的描述是:

For quickly making a snapshot, you can omit both "save" and <message>, but giving only <message> does not trigger this action to prevent a misspelled subcommand from making an unwanted stash.