Yesterday I was trying to help a co-worker with some Git stuff and told him to do a git reset --hard
when I thought he was on his local repo but he was on our live server. This messed a bunch of things up, I think mainly because on our live server we have tons of local uncommitted files on the server, which were uploaded directly through Drupal rather than through committing then pushing/pulling in Git.
I'd like to prevent this from happening again. Is there a git hook that I could write that could prevent anyone from ever doing a git reset --hard
on the live server?