Does GitHub make the time of a repo's latest pull/fetch/clone available (at least to those with write-access to the repo)?
The interest in this information, of course, comes from wanting to gauge how safe it would be to do a git push -f
on the repo that would essentially overwrite the last few commits: if no pull/fetch/clone has happened since the earliest commit-to-be-overwritten was pushed to GitHub, then the overwrite may be OK...
Perhaps an example will clarify my question. For simplicity, let's assume that there's only one local branch (master
) and one remote branch (origin/master
). (IOW, the remote repo has only one branch, and I am tracking it with our only local branch.)
First consider a completely local scenario: I make a commit, and shortly after realize that there was a problem with this commit. In this case, I just overwrite this commit with the correct one using git commit --amend ...
.
Now imagine exactly the same scenario, with the difference that, before noticing the problem with the commit, I push the faulty commit to the remote (GitHub) repo.
If I am the only user of this repo, then I can simply overwrite the commit locally as before, and then use git push -f ...
to overwrite the faulty commit in the remote (GitHub) repo.
If, however, I am not the only user of this repo, the above procedure is problematic, because a different user could have cloned or fetched from the remote (GitHub) repo at some point after I pushed the faulty commit, but before I overwrote the faulty commit in the remote repo.
One way to minimize this possibility is to examine a record of all the pull, fetch, and clone operations performed on the remote repo since the time I pushed the faulty commit to it. If this record shows at least one of such operations, then it would mean that we have precisely the problematic scenario described in the previous paragraph.
If, on the other hand, the record shows no such operation, then there is still some hope that I could overwrite the faulty commit in the remote repo without incurring in the problematic scenario described earlier. (Of course, this is a race condition, so there's no 100% guarantee.)
All this, however, is predicated on the availability of such record of pull, fetch, and clone operations on the remote repo. I'm question is whether GitHub makes such record available, at least to those with write-access to the repo.