gpt4 book ai didi

git - 我怎样才能找出是谁 push 了git?

转载 作者:IT王子 更新时间:2023-10-29 00:55:32 26 4
gpt4 key购买 nike

有人使用了 git push --force 但我无法从日志中判断是谁做的。有没有办法找出罪魁祸首?

最佳答案

2018 年 11 月更新:如果您正在推送到 GitHub 等集中式 Git 存储库托管服务,然后您将能够看到谁强制推送了您的分支。但只是因为 GitHub 选择在其 GUI 中显示该事件。

https://pbs.twimg.com/media/DsJIVxtU4AAreMW.jpg:large

在“Find committer of a force push on GitHub”中查看更多信息。


2013 年的原始答案:

正如我在“Distributed Version Control Systems and the Enterprise - a Good mix?”中提到的,单独使用 Git 没有授权或身份验证。

你需要一个 authorization layer喜欢Gitolite为了跟踪谁做了什么。 (Gitolite 自带审计跟踪机制)。

但是如果你的仓库可以通过 file (or local) protocol 访问, 那么你就不知道是谁强推了。

polygraph (来自 motivationalgenerator.comwikipedia )

关于git - 我怎样才能找出是谁 push 了git?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15028246/

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