看看里面藏了什么而不用它

如何在不实际应用它的情况下查看藏匿内部的内容?

1133152 次浏览

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 stashedstate and its original parent. When no <stash> is given, shows thelatest one. By default, the command shows the diffstat, but it willaccept 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

显示命名stash的变化

git stash show -p stash@{1}

或者简而言之:

git stash show -p 1