2

I have a set of commits where I'd like to find out when they were actually pushed upstream. It's a github enterprise server which I own, and someone committed a bunch of code, do to the nature of git I have to trust their timestamps. I would instead like to see when the code was actually pushed upstream, or when pushes upstream ever happened.

In particular if I could see when all commits were pushed at what point it'd be awesome. I've googled around and closes I can see is finding data using commit dates not push dates.

Ben
  • 177
  • 8
  • 1
    reflog ? http://stackoverflow.com/questions/6795070/is-there-a-way-in-git-to-obtain-a-push-date-for-a-given-commit – Andrew C Oct 29 '14 at 03:20
  • So sadly I think that will only give me updates in the future I've got one in the past I'm looking for. – Ben Oct 29 '14 at 03:40
  • Right. There's a chance you might be logging all ref updates on the server already. If not, you are out of luck unless there is a github specific thing. – Andrew C Oct 29 '14 at 03:43
  • https://help.github.com/enterprise/11.10.340/admin/articles/viewing-push-logs/ doesn't show any timestamps? – VonC Oct 29 '14 at 06:45

1 Answers1

1

The Events API is what you want. Specifically you want to look for a PushEvent which will have an array of commits that were pushed. So if there were 5 or 10 commits pushed at once, they'll all belong to the same PushEvent.

Ian Stapleton Cordasco
  • 26,944
  • 4
  • 67
  • 72