Osiris
Osiris

Reputation: 4185

Lost commits in git

Our remote git repository (on github) is showing '... authored 3 months ago', even though commits were made a few days ago.

Someone must have accidentally run a hard reset. Is there any way to find out the user who performed this operation?

Upvotes: 1

Views: 351

Answers (1)

jub0bs
jub0bs

Reputation: 66244

If you're using GitHub Enterprise, you could figure out who made the blunder, because it allows you to audit repository events, including force push events:

In addition to the repository events mentioned above, every push to a repository is logged with the following information:

  • who performed the push
  • whether it was a force push or not
  • which branch was pushed to
  • which protocol was used
  • the originating IP address
  • which Git client was used

However, I don't think you can get access to such an audit trail with a free GitHub account.

Upvotes: 1

Related Questions