我如何在不实际应用的情况下查看隐藏的内容?
当前回答
从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 Code无法检测已安装的Git
- 强制LF eol在git的回购和工作副本
- Git:在裸库中更改活动分支的正确方法?
- 删除git中的分支是否会将其从历史记录中删除?
- 防止在GitHub上推送到master ?
- 根据Git,谁是“我们”,谁是“他们”?
- git如何合并后樱桃采摘工作?
- Git搜索单个文件历史记录中的字符串
- Git命令显示所有(轻量级)标签创建日期
- Gitignore并没有忽视文件夹
- 什么时候用。git/info/exclude代替。gitignore来排除文件?
- 如何告诉git忽略个别行,即gitignore为特定行代码
- “git diff——耐心”是什么意思?
- 我如何在GitHub中为其他人的代码做出贡献?
- 签出旧的提交并使其成为新的提交