Skip to content

Commit Message Convention

Kijun Kwon edited this page Feb 12, 2024 · 2 revisions

Follows Udacity Git Commit Message Style Guide

Convention

Message Structure

type: Subject (#Issue)

body

footer

Type

  • feat: A new feature
  • fix: A bug fix
  • docs: Changes to documentation
  • style: Formatting, missing semi colons, etc; no code change
  • refactor: Refactoring production code
  • test: Adding tests, refactoring test; no production code change
  • chore: Updating build tasks, package manager configs, etc; no production code change

Subject

  • 50자 이내
  • 대문자로 시작
  • 마침표로 끝나지 않아야 함
  • 명령조를 사용하여 commit이 지금 한 일에 대해 설명
    • For example, use change; not changed or changes.

Issue

  • Subject 뒤에 (#8) 형태로 이슈 번호 부착
  • github 내에서 이슈를 쉽게 열어볼 수 있도록 커스터마이징

(Optional) Body

  • 커밋에 자세한 설명과 맥락이 필요할 때 사용
  • 제목과 본문 사이에 공백 필요
  • 한 줄에 72자 이내로 작성

(Optional) Footer

  • 이슈 트래킹에 사용

Example

feat: Summarize changes in around 50 characters or less

More detailed explanatory text, if necessary. Wrap it to about 72
characters or so. In some contexts, the first line is treated as the
subject of the commit and the rest of the text as the body. The
blank line separating the summary from the body is critical (unless
you omit the body entirely); various tools like `log`, `shortlog`
and `rebase` can get confused if you run the two together.

Explain the problem that this commit is solving. Focus on why you
are making this change as opposed to how (the code explains that).
Are there side effects or other unintuitive consequences of this
change? Here's the place to explain them.

Further paragraphs come after blank lines.

 - Bullet points are okay, too

 - Typically a hyphen or asterisk is used for the bullet, preceded
   by a single space, with blank lines in between, but conventions
   vary here

If you use an issue tracker, put references to them at the bottom,
like this:

Resolves: #123
See also: #456, #789