本文介绍了查看隐藏内容而不应用它的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在可以申请/不要应用一个藏匿处,甚至建立一个隐藏的新分支。是否有可能简单地看到隐藏在内部的内容而不实际应用它? 从 man git-stash
页面:
show []
显示存储器中记录的更改,作为隐藏状态和
其原始父项之间的差异。当没有< stash>给出,显示最新的一个。默认情况下,
该命令显示diffstat,但它会接受git diff
已知的任何格式(例如,git stash show -p stash @ {1}以查看补丁程序中第二个最近的藏匿处
表格)。
因此,要查看最近隐藏的内容,请运行
git储存显示-p
要查看任意存储的内容,请运行以下命令:
git stash show -p stash @ {1}
I see here you can apply/unapply a stash and even create a new branch off of a stash. Is it possible to simply see what is inside the stash without actually applying it?
解决方案
From the man git-stash
page:
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).
So, to view the content of the most recent stash, run
git stash show -p
To view the content of an arbitrary stash, run something like
git stash show -p stash@{1}
这篇关于查看隐藏内容而不应用它的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!