This sounds like the wrong solution to me.  The problem isn&#x27;t (or rather, is rarely[1]) that you&#x27;ve &quot;polluted&quot; a public branch with bad code.  Bad code gets pushed into branches by perfectly legal commits all the time, and you fix it via software engineering and not administrative policy.<p>The real problem with the accidental force push is that it&#x27;s lossy.  The OLD head, to which you would hope to revert when you realize your mistake, is suddenly invisible (and garbage-collectible!).<p>So I&#x27;d much prefer to see github fix this with a &quot;hard reflog&quot; of the branch state on the server.  Track the head of each branch at each point in &quot;monotonic server time&quot; (with a tag or whatnot, or even outside the repository would be fine) such that you can always (1) detect force push events like this and (2) trivially revert them.<p>[1] Yeah, occasionally you might push your site keys, or some NDA-covered source code.  And in those situations you <i>want</i> the reverting push to actually &quot;forget&quot; the code.  But that should be the rare exception and not the standard process.