[SOLVED] Prevent direct changes if branch = master

Hello,

In typical Git projects, teams often introduce a workflow where contributors cannot commit directly to master. They must commit to a branch, which then allows reviewing and checks and builds etc. etc. to satisfy the developer and team that the branch is in a good working state. Once it is, it can then be merged into the master branch, typically via a Pull Request. This reduces the opportunity for people to commit work-in-progress or buggy or breaking stuff into the master branch.

TL;DR : Allowing contributors to directly commit to the master branch of a repo is regarded as bad practice.

My PlayCanvas related question is this - in PlayCanvas can I make the master branch read-only, so that the only way it could be modified is via merges from other branches? This would have the benefit that people on a team don’t directly change the master branch of the project.

Thank you for your message. At present there is no way to make a branch read-only. Such functionality along with a pull request mechanism would definitely be useful and we will consider them at our next roadmap discussion.

Thanks @zpaul, much appreciated! :slight_smile: