커밋 예시
커밋 예시 (Commit Examples)
출처: 문서
본문
이 챕터가 왜 존재하는가
좋은 커밋 메시지가 필요한 이유를 먼저 이해하는 게 중요해요. 자세한 내용은 Conventional Commits 문서를 참고하세요. 좋은 커밋 메시지는 우리가 다음 두 가지를 가능하게 해 줘요.
- 기여자가 무엇을 하려는지 이해할 수 있게 해 준다
- 변경 이력(changelog)을 자동으로 생성해 준다
커밋 메시지 작성 규칙
# (If applied, this commit will...) (Max 72 characters)
# ||
# Explain why this change is being made
# ||
# Provide links or keys to any relevant tickets, articles or other resources
# Use issues and merge requests' full URLs instead of short references,
# as they are displayed as plain text outside of GitLab
# --- COMMIT END ---
# --------------------
# Remember to
# Capitalize the subject line
# Use the imperative mood in the subject line
# Do not end the subject line with a period
# Subject must contain at least 3 words
# Separate subject from body with a blank line
# Commits that change 30 or more lines across at least 3 files should
# describe these changes in the commit body
# Do not use Emojis
# Use the body to explain what and why vs. how
# Can use multiple lines with "-" for bullet points in body
# For more information: https://chris.beams.io/posts/git-commit/
# --------------------
커밋 메시지 템플릿
참고할 만한 커밋 메시지 템플릿이에요.
feat(components): [button] I did something with button
Blank between subject and body is expected.(period is expected)
Describes your change in one line or multi-line.
Capitalize your first letter when starting a new line
Please do not exceeds 72 characters per line, because that would be harder to comprehend.
- You can also add bullet list symbol for better layout
제목(Subject) 헤더의 형식은 다음과 같아요.
[type](scope): [messages]
type과 scope에 쓸 수 있는 값은 commitlint.config.js에서 확인할 수 있어요.
유용한 링크
- Keeping git commit history clean