Conventional Branch" is a tool designed to help standardize branch names in Git for teams working on large projects. The extension allows you to choose from several pre-defined templates, which can be customized to suit your team's specific needs. Once a template is selected, you can easily create new branches with standardized names directly from your IDE. This helps to avoid confusion and promote consistency in branch naming conventions across the team. With "Conventional Branch", you can spend less time thinking about branch names and more time focusing on your work.
You can access VSCode Conventional Branch by using
Command + Shift + P or
Ctrl + Shift + P, enter
Conventional Branch, and press Enter.
How to Customize Branch Name Template
Got to User Settings > Conventionl Branch > format
You can change the default format and keep in mind that these are reserved keywords in this template:
Examples of templates:
How to add Conventional Branch setting to your Workspace Settings
In .vscode > settings.json you can use conventional branch settings.
"conventional-branch.type": ["feature", "fix", "hotfix"],
Base thing we are using is a format which is by default:
Type is a special name. It is an enum that contains different types of branch like
bug and some other options(you can change it via settings).
Branch is also something special. It is the branch name. By default some operations are enabled for branch name. For example we are removing the whitespaces. Or we are converting the text to lower case. These are customaizable options.
||An array that contains different type of branches.
||Branch string must be separated by something. It could be space, dash or anything.
||Set a maximum lenght for the branch name.
||A boolean that converts branch name to lower case
||Removes whitespaces from branch.
||Format for creating branch.
||Minimum lengh for branch name.