我如何在不实际应用的情况下查看隐藏的内容?
当前回答
从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).
注意:根据gitdiff文档,-p选项生成一个补丁。
列出藏匿物品:
git stash list
显示最近存储的文件:
git stash show
显示最近存储的更改:
git stash show -p
显示命名存储的更改:
git stash show -p stash@{1}
或者简而言之:
git stash show -p 1
其他回答
从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).
注意:根据gitdiff文档,-p选项生成一个补丁。
列出藏匿物品:
git stash list
显示最近存储的文件:
git stash show
显示最近存储的更改:
git stash show -p
显示命名存储的更改:
git stash show -p stash@{1}
或者简而言之:
git stash show -p 1
推荐文章
- Visual Studio代码如何解决合并冲突与git?
- 无法推送到远程分支,无法解析到分支
- Git:如何将数据库重置为特定的提交?
- 如何在合并期间使用Git和命令行保存本地文件或远程文件?
- 能够用一个命令推到所有git遥控器?
- 重新基于Git合并提交
- 忽略已经签入目录的内容?
- 如何从windows cmd保存git提交消息?
- (Mac) -bash: __git_ps1:命令未找到
- 如何删除多个已删除的文件在Git仓库
- 使用vimdiff查看所有' git diff '
- 如何拉特定的目录与git
- 本地存储库中的文件与源文件之间的差异
- 将Git存储库内容移动到另一个存储库,保存历史记录
- 如何在GitHub上创建自己的存储库?