So this one's pretty basic. For reasons unknown, Git allows you to delete history. I've searched and searched and searched for a way to turn this off, and it seems there isn't one. Indeed, not only does Git allow you to delete history, but every tutorial I could find recommends that you regularly delete history, "to keep the graph clean". Deleting stuff isn't just possible, it's literally the recommended workflow! [insert horrified face here]
Given the above, it is 100% guaranteed that at some point somebody on my team (possibly even me) will accidentally delete something they didn't mean to, and then everything is ruined forever. Of course, if you realise you messed up, just don't push that to the central repo. You can just clone a new repo and delete the broken one. Problem solved. But what if you don't realise you did something wrong, and you end up pushing it? Now the central repo is broken, and nobody can fix it.
As far as I can tell, there are real, commercial companies doing real, mission-critical work using Git. So how do they "deal with" the abject lack of a safety net here? Surely they must have found a workaround for this. I can't imagine them going "oopsy, we just accidentally deleted 15 years worth of dev work. Oh well, never mind, eh?"
For context: I'm used to working with Mercurial. In that system, you can uncommit something after you committed it, but once it's been pushed to the central repo it's basically impossible to ever delete it. You can create a new commit that undoes whatever it did, but you cannot remove the original commit from history. In this model, no matter how badly you screw up the repo, you can always just revert to a time before you messed everything up. Heck, even if the central repo burns down somehow, just create a new, empty repo and have everyone push to it, and you're back in business again. Because every single repo is like a backup copy of your entire project history, and that history can never be damaged. Unfortunately, Git doesn't work anything like that. Everything can be deleted, and there's no undo.