2280

在这里看到您可以应用/取消应用存储,甚至可以从存储中创建一个新分支。是否可以在不实际应用的情况下简单地查看存储中的内容?

4

1 回答 1

3167

man git-stash(也可以通过 获得git help stash):

此命令隐藏的修改可以用 列出,用和...git stash list进行检查git stash show

show [<stash>]
    Show the changes recorded in the stash as a diff between the stashed
    state and its original parent. When no <stash> is given, shows the
    latest one. By default, the command shows the diffstat, but it will
    accept any format known to git diff (e.g., git stash show -p stash@{1}
    to view the second most recent stash in patch form).

注意:根据文档,该-p选项会生成一个补丁。git-diff

列出存储:

git stash list

显示最新存储中的文件:

git stash show

显示最近存储的更改:

git stash show -p

显示命名存储的更改

git stash show -p stash@{1}
于 2012-05-23T18:58:49.773 回答