Regular Expressions 101

Community Patterns

GitFlow Pure

0

Regular Expression
PCRE (PHP <7.3)

/
(^(feature)\/\d+$)|^(hotfix|release)\/\d+\.\d+\.\d+$|^develop$|^master$
/
gm

Description

This regex helps enforce a pure git-flow branch naming convention. This regex is also drop-in compatible with Gitlab's restrict branch names feature. This was built in reference to Atlassians GitFlow workflow guide

Submitted by anonymous - 4 years ago