I want to protect the main branch from NoMerge_* branches, and set the branch restrictions.
Here's what I expect:
Merging from 'NoMerge_*' to 'main' : Blocked
Merging from 'main' to 'NoMergw_* : allowed.
However, I was able to merge 'NoMerge_TPR20681' into 'main'.
$ git merge NoMerge_TPR20681
Updating 4aa9c40..bada640
Fast-forward
sst20604 | 8 ++++----
sst20681 | 8 ++++----
2 files changed, 8 insertions(+), 8 deletions(-)
$ git branch
NoMerge_TPR20681
* main
$
How can I configure Git to block merges from any 'NoMerge_*' branches into 'main'?
Hi @jang shin ,
Branch restrictions are based only on *destination*. So instead of protecting 'NoMerge_*' you need to protect 'main'.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.