Check who pushed a Git commit

前端 未结 2 1905
太阳男子
太阳男子 2021-01-04 06:33

short: Is there any way to view who has pushed a commit to a git repository?

long: git log shows me who created the co

相关标签:
2条回答
  • 2021-01-04 07:06

    You can see who has merged the branch. When you make git log --all you see all branches. There you can see the merge commits.

    But the problem on Git is that you can define any author and email so you can't be sure that its correct.

    If you need access control you need something like gitolite.

    0 讨论(0)
  • 2021-01-04 07:12

    No, you would need an extra layer added to Git in order to record that kind of operation.
    git log only display the committer and author, as recorded in the commit.
    But that has no bearing on who is actually pushing said commit.

    For instance, gitolite (an authorization layer) adds an audit trail mechanism, with logs.
    See its log file format.

    0 讨论(0)
提交回复
热议问题