GitHub: lock branch on second contributor
Overwriting other peoples code sucks; one way to prevent this is to make sure if you ever force push you always do
git push --force-with-lease.
But that's pretty hard to ensure the entire team always do it (and often you don't know someone else has pushed to your branch so you don't remember to do it); so this sketch protects you.
Any time a second contributor* starts contributing to a branch, this sketch will automatically protect that branch against force pushes.
* Previously opened branches will not gain this protection until two people have commited to them since this sketch was deployed; so what are you waiting for - deploy now!