Protect the `latest` branch?
varjmes opened this issue · 4 comments
varjmes commented
I accidentally committed to master and we should be saved from ourselves by protecting the master branch. Thoughts?
addaleax commented
We can do this, but we should always have a way to force-push to master
to fix up the mistakes that we inevitably make :)
Fishrock123 commented
The reason we didn't for node boils down to two things:
- Git is easy recoverable because the repository is fully distributed to whoever clones it. Any one of us can easily push back everything even if master is deleted or messed up entirely.
- Being force-pushable allows some window for people to fix inevitable mistakes in e.g. metadata or anything else.
I personally do not feel that it is very necessary to do for git, or at least for any repository where a sizeable amount of people have up-to-date copies.
ljharb commented
If you use branch protection, a repo admin can disable the protection temporarily, force push, and then re-enable it, if needed.