我如何在不实际应用的情况下查看隐藏的内容?
当前回答
从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
推荐文章
- 了解Git和GitHub的基础知识
- 没有。Git目录的Git克隆
- Git与Mercurial仓库的互操作性
- 忽略git中修改(但未提交)的文件?
- “git restore”命令是什么?“git restore”和“git reset”之间有什么区别?
- Git合并与强制覆盖
- Git拉另一个分支
- 在Bash命令提示符上添加git分支
- 如何更改Git日志日期格式
- git pull -rebase和git pull -ff-only之间的区别
- GitHub -致命:无法读取用户名https://github.com':没有这样的文件或目录
- 撤消git平分错误
- 使用.gitconfig配置diff工具
- 如何配置Mac OS X术语,使git有颜色?
- Visual Studio Code: .git文件夹/文件隐藏