:wq cheats/git-commits
Rogério Rodrigues de Alcântara

Rogério Rodrigues de Alcântara @roalcantara

About: "An ape who happens to talk, code and tweet" &> /dev/null

Location:
São Paulo/SP/Brazil/Earth
Joined:
Sep 15, 2019

:wq cheats/git-commits

Publish Date: Sep 13 '23
0 0

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)]
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

Commit with ! to draw attention to breaking change

feat!: Send email to the customer when product is shipped
Enter fullscreen mode Exit fullscreen mode

Commit with scope and ! to draw attention to breaking change

feat(api)!: Send email to the customer when product is shipped
Enter fullscreen mode Exit fullscreen mode

Commit with both ! and BREAKING CHANGE footer

chore!: Drop support for Node 6

BREAKING CHANGE: use JavaScript features not available in Node 6.
Enter fullscreen mode Exit fullscreen mode

Commit with no body

docs(CHANGELOG): Correct spelling
Enter fullscreen mode Exit fullscreen mode

Commit with scope

feat(lang): Add Polish
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

Tooling


References

Comments 0 total

    Add comment