Branch Naming.
General Naming Tip:
Always follow this pattern:
<prefix>/<short-description-with-hyphens>
- Use lowercase letters.
- Use hyphens (-) instead of spaces.
- Keep the description short and to the point.
Branch naming Type-Based Prefixes
These prefixes help you quickly understand what kind of changes are on a branch, making your Git history cleaner and collaboration easier.
feature/(orfeat/) - For New Things- When to use: When you're adding a completely new piece of functionality or a new part of the application.
- Think: "I'm adding something that wasn't there before."
- Examples:
feature/user-login(adding a login system)feature/product-search(adding a search bar for products)feat/dark-mode(adding a new theme option)
bugfix/(orfix/) - For Fixing Problems- When to use: When you're correcting something that is broken or not working as intended.
- Think: "Something is wrong, and I'm making it right."
- Examples:
bugfix/login-button-not-working(the login button doesn't do anything)xfix/image-display-error(an image is not showing up correctly)bugfix/wrong-total-calculation(the shopping cart total is incorrect)
style/- For Visual/Code Formatting Changes- When to use: When you're making changes that affect the look of the application (CSS, UI tweaks) without changing its core functionality, OR when you're just fixing code formatting (like linting issues, spacing, etc.).
- Think: "I'm making it look better or making the code consistent, but not changing how it works."
- Examples:
style/update-button-colors(changing the color scheme of buttons)style/responsive-layout-fixes(adjusting layout for different screen sizes)style/indentation-fix(correcting inconsistent spacing in the code)style/font-size-adjustments(tweaking text sizes)
chore/- For Maintenance & Behind-the-Scenes Tasks- When to use: For tasks that don't add new features or fix bugs directly, but are necessary for the project's health and maintenance.
- Think: "I'm doing something necessary for the project, but it's not a new feature or a bug fix."
- Examples:
chore/update-dependencies(updating libraries your project uses)chore/cleanup-old-files(removing unused files)chore/add-gitignore-entries(ignoring certain files from Git)
Branch for Challenge Repositories
For the challenge repository, we will be using the convention: <session name>/<challenge Name>