github - GIT: How to protect the branch from being removed by other developers? -


After the first release of our product, we are going to separate branches for the development of main development and convenience. Is there a way to create a branch in this way, so that we can protect it (by mistake or on purpose) by deleting it, unless you are a specific user (depending on the role or username)?

I tried to create a sample GIT repository in our local Geetabab machine, then preserve one of the options given on the website, but then I would extract it with the git push origin Was able to: branch_name . thank you in advanced!

Will the solution work on github.com?

There are several ways to deal with this:

  1. Repo box Make a second repo and allow only reading facility for Master Plus, if they remove from the accident, they can get the branch from the master repo. It assumes that you are using github only for your repo for Local Diff Repo.
  2. Set up hooks in the repository that do not allow the branches to be removed unless you are a specific user. You can not do that on github, because they will not allow arbitrary code execution on their servers. If you receive a local repo instead, you can do so.
  3. Install a local guitolat to manage the branches with permissions.

Comments