Git Commit Message - MarcScheib/legendsrising GitHub Wiki
The git commit message should have the following format:
<type>(<scope/issue>): <subject>
<BLANK LINE>
<body>
<BLANK LINE>
---
<BLANK LINE>
<diff>
The placeholders (in < and >) need to be replaced. Line length guide needs to be used for commit, i.e. the title line has max. 50 characters and all other lines have a maximum of 72 characters.
If the prefix is feat
, fix
or perf
, it will always appear in the changelog.
Other prefixes are up to your discretion. Suggested prefixes are docs
, chore
, style
, refactor
, and test
for non-changelog related tasks.
- feat: A new feature
- fix: A bug fix
- docs: Documentation only changes
- style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
- refactor: A code change that neither fixes a bug nor adds a feature
- perf: A code change that improves performance
- test: Adding missing tests
- chore: Changes to the build process or auxiliary tools and libraries such as documentation generation
The scope could be anything specifying place of the commit change.
The subject contains succinct description of the change:
- use the imperative, present tense: "change" not "changed" nor "changes"
- don't capitalize first letter
- no dot (.) at the end
Just as in the subject, use the imperative, present tense: "change" not "changed" nor "changes". The body should include the motivation for the change and contrast this with previous behavior.
Add the diff of the commit from git diff HEAD --stat=73
A git diff from a sub directory is possible with the parameter --relative
.
Filter can be used via --diff-filter=[(A|C|D|M|R|T|U|X|B)…[*]]
.