如何检查文件或文件夹(就我而言)是否已从您的git历史记录中删除?

发布于 2025-02-04 17:58:15 字数 81 浏览 2 评论 0原文

我使用“ bfg repo清洁器”删除了我不小心跟踪并推到远程存储库的文件夹(目标),我想知道如何检查该文件夹是否确实完全从GIT历史记录中删除了?

I used the "BFG Repo Cleaner" to remove a folder (target) I accidentally tracked and pushed to the remote repository, and I am wondering how I can I check if the folder was indeed completely removed from the git history?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

靑春怀旧 2025-02-11 17:58:15

假设

 git log -- <pathnameOfFolder>

如果它空了,则没有包含此类文件夹的提交。

如果您只知道一个曾经在此文件夹中的文件的名称,并且该名称在整个项目中是唯一的,则可以说

 git log -n 1 -- */<filename>

如果是空的,则该文件已从历史记录中消失;这将是奏效的主要线索。

Say

 git log -- <pathnameOfFolder>

If it comes up empty, no commit containing such a folder is reachable.

If you know the name of just one file that used to be in this folder, and if that name is unique across the whole project, it suffices to say

 git log -n 1 -- */<filename>

If that comes up empty, that file is gone from the history; that will be a major clue that this has worked.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文