Commit Message Guidelines
Why Commit Messages Matter
Commit messages are essential for understanding the history of a project. They help: - Collaborators understand the purpose of changes. - Future developers debug and maintain the code. - Reviewers assess the scope and impact of changes.
Best Practices for Writing Commit Messages
- Be Clear and Concise: Use simple language to describe what and why.
- Use the Imperative Mood: Write as if giving a command (e.g., "Add feature" instead of "Added feature").
- Focus on the "Why": Explain the reason for the change, not just what was changed.
- Break Down Large Changes: If a change is too big, split it into smaller, logical commits.
- Prefixes According to the Type: Use appropriate prefixes like
feat,fix,docs,test, etc., to categorize changes, if modify class only for test usetestprefix. - Task_ID Decision : set as same as the newest commit
.
Template for Commit Messages
<task_id> /<type>: <short_summary>
- <bullet_point_1>
- <bullet_point_2>
- <bullet_point_3>
Example
BI_123456_TK_78910 /feat: Implement Mapping Logic
- Added handle mapping of header information from raw data.
- Introduced mapping line information with various rules and conditions.