The Jenkins guys seem to have had a rough day.
yesterday something strange has happen to many Jenkins repositories on GitHub (more then 50 Repos)…
Luca Milanesio seems have pushed to many many repositories without really changing anything – at least I have not seen anything changed.
But the folks at github have helped by restoring the state prior to the force push into a separate branch. Good old
git reflog to the rescue.
Typically recovering a force push is straightforward:
1. git reflog > look at the SHA-1 before the forced push
2. git branch -f <name> <sha-1>
As far as I know, bare repos don’t have reflog enabled by default. They might have turned on
core.logAllRefUpdates for all the repos at github by default.