What is cnb?
cnb is a customizable CLI tool designed to help teams and developers create Git branches with consistent naming conventions effortlessly. Instead of manually typing branch names, cnb prompts you to select a branch type and add a description, automatically formatting it to a standardized branch name.
Why Do You Need It?
Maintaining consistent branch naming across projects can be challenging, especially in large teams. Poorly named branches lead to confusion and disrupt workflows. cnb solves this by enforcing your teamβs naming conventions, making it easier to track, organize, and review branches. This tool is perfect for teams using Git who want to establish a clean, standardized workflow.
Key Features:
β’ Interactive Branch Creation: Select the branch type (e.g., feat, fix, chore) and provide a description to generate a properly formatted branch name.
β’ Customizable Config: Tailor the branch types, description length, ticket ID requirements, and more through a simple configuration file.
β’ Efficient Workflows: Quickly create branches that follow your teamβs conventions without memorizing complex naming rules.
β’ Simple Setup: Easily integrate with Git using a few configuration steps and start creating branches using the git cnb command.
How It Works:
With cnb, creating a branch is as simple as:
1. Running git cnb.
2. Choosing your branch type from a set of options (e.g., feat, fix, etc.).
3. Providing a brief description.
4. The tool automatically formats your branch name according to your teamβs conventions!
Example:
β’ Inserted ticket id: 12345
β’ Selected type: feat
β’ Description: configure notifications
β’ Resulting branch: Jira-12345/feat/configure-notifications
How to Get Started:
- Install cnb as a dev dependency:
npm i -D cnb
- Set up a Git alias and configuration following the steps in the documentation.
Start using cnb today and bring consistency and efficiency to your Git branching workflow!
Check out the full project on GitHub or install it from npm.
Top comments (0)