Add Configurable Pattern Matching For Feature Branch Detection in Forced-Push Settings
It appears that SmartGit only supports strict Gitflow naming conventions for the setting:
“Allow modifying pushed commits (e.g., forced push): Only for feature branches” (see Preferences dialog below). Currently, this option recognizes only branches that begin with the standard prefix, for example:
- feature/my-feature.
However, Git supports hierarchical branch naming, and many teams organize branches using developer or team namespaces, such as:
- jmt/feature/my-feature
- teamA/feature/my-feature
- dev123/feature/some-feature.
These branches are not recognized as feature branches under the current implementation, and therefore are prevented (see Push warning dialog below) from performing forced pushes unless the more permissive “For all branches” option is selected. This introduces unnecessary risk by enabling forced pushes across all branches rather than restricting them to intended feature branches.
Consider adding support for configurable detection patterns (e.g., wildcard or regex) for the “Allow modifying pushed commits” option. For example:
- feature/* (default, GitFlow)
- */feature/* (namespaced branches: jmt/feature/foo)
- */feature-* (flat naming: jmt/feature-bar)
This would preserve the existing default behavior while allowing greater flexibility for teams that use developer, team, or other namespacing conventions in their branch structures. This enhancement would enable safer and more precise control over forced push permissions without requiring teams to abandon established branch naming practices.


Customer support service by UserEcho