简体   繁体   中英

Git / Azure Repos - is it possible to block commits on master if a certain branch exist?

The following situation: When we create a release candidate, we make a branch release/*.

This is then tested and if necessary fixes are made on this branch.

After that it is merged back into master and tagged.

In between, no commits may be made to master.

Is there a technical way to prevent this or at least to give a warning if a branch with the pattern release/* exists?

You can write any script you like and make it run on certain conditions. It's called Git Hooks. Lots of information is available on them, such as on https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM