How can I find out who force pushed in git?

前端 未结 2 1706
隐瞒了意图╮
隐瞒了意图╮ 2020-11-27 05:57

Someone used git push --force but I can\'t tell who did it from the logs. Is there a way to identify the culprit?

2条回答
  •  醉酒成梦
    2020-11-27 06:33

    If you are lucky enough to use GitHub or GitHub for Enterprise, you can have a look to the events REST API and check who/when Pushed/Dropped to the remote refs, example for log4j:

    https://api.github.com/repos/apache/log4j/events

提交回复
热议问题