GitHub uses fnmatch
to match against any pattern provided to find out the branches to which the rule applies for branch protection.
There isn’t an exact fnmatch
pattern for GitHub yet which can resolve to precisely anything other than master, but the pattern closest to it would be:
*[!master]*
But this would also exclude branches with only m
,a
,s
,t
,e
,r
or branches with only a combination of those letters.
Check out more details on the above on GitHub help and the fnmatch documentation