Mostly reasonable guidelines for commit messages.
Commit Message Format
<message> <description> <related>
No line should be longer than 80 characters long, for optimal github viewing.
refactor(plans#show): remove 1 of 4 templating languages
feat: New feature
fix: Bug fix
format: Change not affecting the meaning of code (white-space, formatting, etc)
docs: Documentation-only change
style: Stylesheet-only change
refactor: Change that neither fixes a bug or adds a feature
perf: Change that improves performance
test: Addition of a missing test
chore: Changes to the build process or auxiliary tools and libraries
The scope could be anything specifying the site of the commit change. For
The subject contains a succinct description of the change:
- use the imperative, present tense: “change” not “changed” nor “changes”
- don’t use capitalize first letters
- don’t use trailing punctuation (.)
Just as in the subject, use the imperative, present tense: “change” not “changed” nor “changes” The body should include the motivation for the change.
The footer should contain any information about Breaking Changes and is the place to reference Trello cards, or GitHub issues that the commit Closes.
This guide is
pirated from inspired by Angular’s excellent
A detailed explanation can be found in this document.
Your stuff’s on staging but you’re making small, progressive tweeks.
fixup is your friend.
Fixup commits are associated with commit you’ve already made. They allow you to make commits without inserting additional messages. They can also be automatically squashed, for those civilized developers.
Here’s how it works.
--fixup as on option. When used, you’ll have to provide the SHA of the commit your is fixing up. Like so:
git commit --fixup a9b8c7 # aliases also work but get confusing after your first fix git commit --fixup head
You probably don’t memorize your recent commit SHAs. You can use the syntax below as a backword search. This fixup commit will attach to the most recent commit, where “style” is in the message:
git commit --fixup :/style