Git Commits
A well-structured commit message makes it easier to track changes, collaborate efficiently, and maintain a clean project history. A good commit message follows a consistent format, making it immediately clear what was changed and why. By following a structured naming scheme, developers can quickly understand the purpose of each commit without needing to dive into the code itself.
Commit Message Breakdown
Each commit message should follow this format:
<type>: <short description>
<body> (optional)
- Title (Type + Description): A concise summary of the change.
- Body (Optional): A more detailed explanation if necessary.
Example:
fix: resolve login form validation error
Corrected the email validation logic that incorrectly rejected valid email formats. Updated test cases to cover edge cases.
Example Naming Scheme
The following provides examples of git commit titles for different types of tasks. Note that the task type is usually abbreviated and followed by a colon with a short blurb. More detailed information should dbe provided in the commit description.
Initialization
init: setup Unity project with basic structure
init: initialize repo with README and .gitignore