Git Commits
- How to Write a Git Commit Message
- 5 Useful Tips For A Better Commit Message
- Conventional Commits
- Atomic Git Commits
7 rules of a great Git commit message
- #1 Keep in mind: This has all been said before.
- #2 Separate subject from body with a blank line
- #3 Limit the subject line to 50 characters
- #4 Capitalize the subject line
- #5 Do not end the subject line with a period
- #6 Use the imperative mood in the subject line
- #7 Wrap the body at 72 characters
- #8 Use the body to explain what and why vs. how
Commit message structure
<type>[optional scope]: <Description>
[optional body]
[optional footer(s)]
Examples
Commit with description and breaking change footer
feat: Allow provided config object to extend other configs
BREAKING CHANGE: `extends` key in config file is now used for extending other config files
Commit with ! to draw attention to breaking change
feat!: Send email to the customer when product is shipped
Commit with scope and ! to draw attention to breaking change
feat(api)!: Send email to the customer when product is shipped
Commit with both ! and BREAKING CHANGE footer
chore!: Drop support for Node 6
BREAKING CHANGE: use JavaScript features not available in Node 6.
Commit with no body
docs(CHANGELOG): Correct spelling
Commit with scope
feat(lang): Add Polish
Commit with multi-paragraph body and multiple footers
fix(requests): Prevent racing
Introduce a request id and a reference to latest request.
Also:
- Dismiss incoming responses other than from latest request.
- Remove timeouts which were used to mitigate the racing issue but are obsolete now.
Refs: #123
Tooling
References
- Pro Git book
- Como fazer um commit semântico
- Conventional Commits: Cheat Sheet
- Git e Github na prática: Guia do iniciante
- A guide to improve the Git(Hub) flow and commits messages
- Git Flow vs GitHub Flow | Alex Hyett
- What are the pros and cons of git-flow vs github-flow?
- Choosing the Right Git Workflow for Your Project: GitFlow, GitHub Flow
- Workflows Comparison: Git Flow Vs GitHub Flow - Fresh Consulting
- Git(Hub) Flow, Trunk Based Development, and Code reviews
Top comments (0)