ayojs/ayo

Protect the `latest` branch?

varjmes opened this issue · 4 comments

I accidentally committed to master and we should be saved from ourselves by protecting the master branch. Thoughts?

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 :)

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.

If you use branch protection, a repo admin can disable the protection temporarily, force push, and then re-enable it, if needed.

I'm ok with branch protection as a mechanism to prevent accidental pushing to master. Very much not ok as way to gatekeeper things getting landed. I think if go with the intention as @ljharb says, it's seems non to burdensome?