| Automated commit messages generated from diffs can be helpful because they provide a quick and concise summary of the changes made, saving developers time and effort by automatically describing the modifications. This improves commit history readability and facilitates easier code review by providing a preliminary understanding of the changes without needing to delve directly into the code. Furthermore, consistent and informative commit messages improve project maintainability, enabling better tracking of code evolution and easier debugging by providing context to the changes. To ensure clear and comprehensive commit messages, simply create a .cursorrules file and populate it with relevant information to guide your commit writing. This approach streamlines the commit process by providing a consistent framework for crafting informative and easy-to-understand messages. {
"$schema": "https://raw.githubusercontent.com/getcursor/cursor/main/cursor.schema.json",
"commitMessage": {
"template": "{type}{scope}{colon} {description}",
"types": [
"create",
"add",
"update",
"delete",
"remove",
"implement",
"refactor",
"docs",
"test",
"style",
"ci",
"perf",
"fix",
"chore",
"build",
"revert",
"merge"
],
"allowBullets": false,
"prefixBullet": "",
"colon": ":",
"subjectPatternError": "Subject must start with a valid action, scope in parentheses, colon, and contain no more than 10 words total. Scopes must be separated by commas. Use lowercase letters only. The commit message must be based on the new update or change.",
"maxWords": 10,
"scopeSeparator": ",",
"additionalTemplates": [
"{type}({scope}): {description}"
],
"descriptionPattern": "^[A-Za-z0-9 ,\\-()]+$",
"mergeRules": {
"feature/*": {
"template": "merge(feature): Merge feature branch {branch}",
"descriptionPattern": "^Merge feature branch [A-Za-z0-9\\-_/]+$"
},
"bugfix/*": {
"template": "merge(bugfix): Merge bugfix branch {branch}",
"descriptionPattern": "^Merge bugfix branch [A-Za-z0-9\\-_/]+$"
},
"hotfix/*": {
"template": "merge(hotfix): Merge hotfix branch {branch}",
"descriptionPattern": "^Merge hotfix branch [A-Za-z0-9\\-_/]+$"
},
"release/*": {
"template": "merge(release): Merge release branch {branch}",
"descriptionPattern": "^Merge release branch [A-Za-z0-9\\-_/]+$"
},
"*": {
"template": "merge: Merge branch {branch}",
"descriptionPattern": "^Merge branch [A-Za-z0-9\\-_/]+$"
}
}
}
}
|