不用查看即可看到隐藏的内容

可能重复:
是否可以预览 git 中的隐藏内容?

在这里看到您可以应用 / 取消应用存储,甚至可以从存储创建新分支。是否可以简单地查看存储盒中的内容而无需实际应用?

答案

man git-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).

列出隐藏的修改

git stash list

显示上次存储已更改的文件

git stash show

因此,要查看最新存储的内容,请运行

git stash show -p

要查看任意存储的内容,请运行类似

git stash show -p stash@{1}