GitHub Collaboration Branch Naming Conventions
Learning objective: By the end of this lesson, students will be able to identify common branch naming conventions.
Best practice branch naming conventions
Ideally, branch names should be descriptive and follow a consistent format. Here are some common branch naming conventions:
dev: Used for the main development branch.feature/: Used for new features or enhancements.bugfix/: Used for bug fixes.hotfix/: Used for critical bug fixes that need to be deployed immediately.refactor/: Used for refactoring code.release/: Used for preparing a new release.docs/: Used for documentation changes.test/: Used for adding or modifying tests.chore/: Used for miscellaneous tasks or maintenance.
By following a consistent naming convention, you can easily identify the purpose of each branch and maintain a clean and organized codebase.
🧠Branches like
feature/sign-in,bugfix/home-page-error, andrefactor/cat-show-componentuse the naming convention to the fullest potential.
Best practice branch naming conventions with collaborators
💡 When using the collaborator method, you’d still add your indentifier to the start of the branch name, making the full name of our examples above soemthing like:
<identifier>/feature/sign-in,<identifier>/bugfix/home-page-error, and<identifier>/refactor/cat-show-component.