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'.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.