git - 您如何查看哪个提交从 repo 协议(protocol)中删除了文件?

标签 git

<分区>

因为它不再在存储库中,所以我不能这样做

git log <filename>

我能跑

git log  --diff-filter='D|R' <directory_that_contained_it>

但是信息太多了,grepping 它似乎没有列出我正在寻找的文件。

最佳答案

git log -1 --stat -- <path/to/file>

我把 --stat 放在那里,这样你就可以验证文件是否被删除了。

关于git - 您如何查看哪个提交从 repo 协议(protocol)中删除了文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9604485/

相关文章:

linux - git newbie 2fer "your patch does not apply"错误&选项错误

将 `main` 和 `master` 视为相同的 git 别名

git - Jenkins 不显示配置的 git 凭据

eclipse - 解决所有 merge 后,如何摆脱 Eclipse Git "conflict"图标?

Git: "Error: refusing to create funny ref ' HEAD' remotely"用于初始推送

windows - 从 Mercurial 迁移后,Git 在 Windows 11 上无法正确识别带变音符号的文件

git - 保护 git 服务器

python - 如何从 gitpython 中的存储库路径获取变量中的 Ostream 或 Oinfo 列表?

windows - Windows 7 代理后面的 git 中的 SSH

git - 使用 Git 重新应用提交,同时忽略所有空间更改