2 ms·
"Hey I just force pushed an old main branch, accidentally, did anyone do a pull earlier today so we can restore?" Kids these days who have branch protection tu
by lamontcg 5y ago
"Hey I just force pushed an old main branch, accidentally, did anyone do a pull earlier today so we can restore?"
Kids these days who have branch protection turned on won't get this joke.
- chrismorgan 5y agoIf you’re talking about Git, then as a rule of thumb you’ve got at least 30 days before anything will actually be deleted: you can retrieve what was lost from the reflog. You could start with something like `git checkout "main@{4 hours ago}"`, then delve further into the reflog itself if that doesn’t produce exactly what you want.