Reputation: 2087
We recently moved from Perforce to Git and for technical reasons are have to stick with our old naming conventions for branches, which is: For Features: feature_abcd_123 For Bugfixes: bugfix_xyz_6789 For Custom: custom_mnop_8965
It is very difficult (next to impossible) for us to adopt Git’s branch grouping naming conventions which is using “/“. eg feature/, custom/ etc.
But we still want the benefit of grouping our branches based on first occurrence of underscore “_”.
Main reason why we need to group branches? So that users using SourceTree GUI can easily find their required branch under individual group. And there are other backend requirements to manage which we might require once the user base will increase and branching will be more frequent.
I need help in understanding how to work with Git branching and grouping them custom characters like “_” in our case.
Are there any hacks at Git Client end to display branches grouped under custom grouping conventions?
Upvotes: 1
Views: 328
Reputation: 1324318
Are there any hacks at Git Client end
Not that I know of, and it depends on the client:
a simple git bash client would allow for simple grepping:
git branch | grep "feature_"
a Visual Studio Code allows you to type the beginning of a branch and see immediately the ones beginning with what you have typed:
(shown here with branch names using /
, but that would work with _
)
Upvotes: 0