We are using Git with three main branches Development, Test & Master in bare-repository.
We have many development environments all are having git repository. Everyone created development branch and works on that branch and push their code to Development branch in bare-repository.
Meanwhile we want to restrict the developers to push their code to Test & Master branch from their development branch.
Is there any way to protect bare-repository branches by using password.
I strongly recommend using gitolite if you are using linux to host the repository.
Gitolite allows you to specify per user or groups of users what branches they can push to, and more.
Gitolite is useful in any server that is going to host multiple git repositories, each with many developers, where "anyone can do anything to any repo" is not a good idea. Here're two examples to illustrate.
It uses ssh keys to identify users, and based on that decide what is allowed or not.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With