gpt4 book ai didi

git - 如何删除 Azure Git 推送历史记录?

转载 作者:行者123 更新时间:2023-12-05 03:00:10 25 4
gpt4 key购买 nike

我不小心用错误的凭据提交到 Azure DevOps 中的 git。

为了修复它,我运行了 git filter-branch 并强制推送。

但是,当我查看 Azure DevOps gui 时,它显示:

Authored On
Committed On
Pushed On

当我点击“Pushed On”时,它会显示已更新的引用,并允许我查看其中包含我的旧凭据的原始提交。

我怀疑 Azure DevOps 是从 reflog 中获取的。

有什么办法可以删除这些多余的信息吗?

你能使服务器上的 reflog 过期吗?

最佳答案

除非您删除存储库并将修改后的版本推回同名的新存储库,否则(目前)似乎没有办法。

本案例中类似的问题已在 Azure Community site 上得到解答.

用他的话说:

Because git is distributed, once you check in a sensitive info, you should assume it is compromised and change it. Anyone could clone the repository or access the commit without your knowledge within that time frame. We don't garbage collect our commit data, so you are correct that you can get to a commit within the system after it has been "deleted". We don't provide a way to delete commits permanently in Azure DevOps.

关于git - 如何删除 Azure Git 推送历史记录?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57135078/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com