In our project (which is hosted on GitHub), someone accidentally force-pushes master every once in a while. No one is aware if doing so, and I would like to find out who does it and what sort of misconfigured tool or bad habit is behind it.
So the question is, how to identify the user who made the force push? When I pull I see something like this:
# git pull --prune
(.....)
+ 4c0d44c...138b9ed master -> origin/master (forced update)
but 138b9ed
is just the latest commit in origin/master, and anyone might have committed after the force push; it is even possible that the force pusher himself did not commit anything, just rebased, so his name is not even present in the rewritten part of origin/master's history as an author.
I also tried git reflog origin/master
, but it just gives the same information: there is a record saying git pull --prune (forced update)
with the commit id 138b9ed
, but that will again give the last committer into master, not the one who did the force push. Running git reflog master
on the origin server would probably help, but GitHub does not give you that sort of access AFAIK.
Is there any reliable way to find out whom the push originated from (and when)?