可能重复:
是否可以在 git 中预览藏匿内容?
我在这里看到你可以申请 / 取消申请藏匿,甚至可以从藏匿处创建一个新的分支。是否有可能只是在没有实际应用它的情况下简单地看到藏匿处内的东西?
从man git-stash
页面:
这个命令隐藏的修改可以用 git stash 列表列出,用 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}