Following conventions in branch names and commit messages is crucial for efficient version control tracking. There are several ways to establish conventions, but I'll explain a commonly used approach here. We'll assume you're using a project management tool that generates unique IDs for tasks, and you're creating new branches for each task and subtask.
Before you start, keep these important placeholders in mind
[TASK ID] ⇒ Unique ID for the task
[VERSION] ⇒ Numeric version number without dots (.) of the related task
[MESSAGE] ⇒ Description of the committed changes
While branch names can be anything, including the task ID and version number as a prefix gives the branch better identity.
Format:
[TASK ID]-[VERSION]-[short form of your related task title]
Examples:
THB02-501-email-templates
XYZ04-451-paypal-integration
A commit may include different types of changes. Using a conventional format helps identify changes clearly and meaningfully. Here are formats for common changes in regular work.
Use the keyword feat: to identify a new feature implementation.
Format:
[TASK ID]-[VERSION]|feat: [short message or name of the implemented feature]