为什么“保存”在git stash手册中不存在

问题描述 投票:1回答:1

我正在看关于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中的命令语法是否有一些变化?

git git-stash
1个回答
1
投票

@ElpieKay在他的评论中给出了答案。

引用git help stash

保存[-p | --patch] [-k | - [no-] keep-index] [-u | --include-untracked] [-a | --all] [-q | --quiet] [ ]

不推荐使用此选项,而使用git stash push。它与“stash push”的不同之处在于它不能采用pathspecs,并且任何非选项参数都构成了消息。

© www.soinside.com 2019 - 2024. All rights reserved.