我正在观看关于 git 的免费讲座。
屏幕显示了 git stash
的帮助消息(通过 git stash --help
)。它出现在我的终端中,如下所示:
git stash [push [-p|--patch] [-k|--[no-]keep-index] [-q|--quiet]
[-u|--include-untracked] [-a|--all] [-m|--message <message>]
[--] [<pathspec>...]]
但在讲座中,他们使用 save
代替 push
。我的git版本是2.17.1。 git stash 中的命令语法是否有一些变化?
最佳答案
@ElpieKay 在评论中给出了答案。
引用git help stash
:
save [-p|--patch] [-k|--[no-]keep-index] [-u|--include-untracked] [-a|--all] [-q|--quiet] []
This option is deprecated in favour of git stash push. It differs from "stash push" in that it cannot take pathspecs, and any non-option arguments form the message.
关于git - 为什么 'Save' 在 git stash 手册中不存在,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54705288/