我如何在不实际应用的情况下查看隐藏的内容?
当前回答
从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添加?
- Rubymine:如何让Git忽略Rubymine创建的.idea文件
- Gitignore二进制文件,没有扩展名
- Git隐藏错误:Git隐藏弹出并最终与合并冲突
- 了解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之间的区别