협업을 위한 Git Commit 컨벤션 정리
Google/AngluarJS 커밋 컨벤션 + Conventional Commits 페이지를 참고하여 정리함
커밋의 구조
: Each commit message consists of a header
, a body
, and a footer
.
<header>
<BLANK LINE>
<body>
<BLANK LINE>
<footer>
- 헤더
header
::= <type>(<scope>): <short summary>- The header is mandatory and the scope of the header is optional.
- short summary: Summary in present tense. Not capitalized. No period at the end.
- 바디
body
::= (<sentence>)- optional
- 푸터
footer
::= (<sentence>)- optional
- The footer should contain a closing reference to an issue if any.
- The footer should contain any information about Breaking Changes.
Any line of the commit message cannot be longer 100 characters! This allows the message to be easier to read on GitHub as well as in various git tools.
헤더, 바디, 푸터 중 어느 줄도 100자를 넘겨서는 안 된다!!!
헤더의 Type 종류
(2018) Angular Commit Message Guidelines
Allowed <type>:
- feat (feature) - 새로운 기능 구현
- fix (bug fix)
- docs (documentation) - 문서 작업 ( 리드미 작성, ... )
- style (formatting, missing semi colons, …) - 코드 포매팅, 컨벤션 적용 등
- refactor - 코드 리팩토링 ( 부분 수정 )
- test (when adding missing tests)
- chore (maintain) - 빌드 수행, ...
src: https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y
(2025) Angular Commit Message Guidelines
Type Must be one of the following:
- build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
- ci: Changes to our CI configuration files and scripts (examples: Github Actions, SauceLabs)
- docs: Documentation only changes
- feat: A new feature
- fix: A bug fix
- perf: A code change that improves performance
- refactor: A code change that neither fixes a bug nor adds a feature
- test: Adding missing tests or correcting existing tests
misc.
- remove: 파일 삭제
- design: CSS 스타일 변경
- and so on...
참고자료
Conventional Commits (한글)
Conventional Commits 1.0.0개요
Conventional Commits 스펙은 커밋 메시지에 곁들여진 가벼운 컨벤션으로 명확한 커밋 히스토리를 생성하기 위한 간단한 규칙을 제공합니다. 이렇게 만들어진 커밋 히스토리를 이용하여 더 쉽게 자동화된 도구를 만들 수 있습니다.
이 컨벤션은 커밋 메시지에 신규 기능 추가, 문제 수정, 커다란 변화가 있음을 기술함으로써 유의적 버전(Sementic Versioning)과 일맥상통한 면이 있습니다.
커밋 메시지는 다음과 같은 구조가 되어야 합니다:
<타입>[적용 범위(선택 사항)]: <설명>
[본문(선택 사항)]
[꼬리말(선택 사항)]
커밋에는 라이브러리를 사용하는 사람들에게 의도를 전달하기 위해 다음과 같은 구조적 요소가 포함되어 있습니다.
- fix: 코드베이스에서 버그를 패치하는
fix
타입 의 커밋 (이는 유의적 버전에서의PATCH
와 관련이 있습니다). - feat: 코드베이스에서 새 기능이 추가되는
feat
타입 의 커밋 (이는 유의적 버전에서의MINOR
와 관련이 있습니다). - BREAKING CHANGE:
BREAKING CHANGE:
이라는 꼬리말을 가지거나 타입/스코프 뒤에 !문자열을 붙인 커밋은 단절적 API 변경(breaking API change)이 있다는 것을 의미합니다 (이는 유의적 버전에서의MAJOR
와 관련이 있습니다). 어떤 커밋 타입이라도 BREAKING CHANGE는 해당 커밋의 일부가 될 수 있습니다. fix:
와feat:
이외의 다른 타입 도 허용됩니다. 예를 들어 앵귤러 컨벤션을 기반으로 하는 @commitlint/config-conventional에서는build:
,chore:
,ci:
,docs:
,style:
,refactor:
,perf:
,test:
등의 타입을 사용할 것을 권고하고 있습니다.BREAKING CHANGE:<description>
이외의 꼬리말 을 규정 할 수 있으며 다음과 비슷한 컨벤션을 따를 수 있습니다. git trailer format.
추가 타입들은 컨벤션 커밋 규격에 의해 의무화되지 않으며, 유의적 버전에 잠재적인 영향을 주지 않습니다(그것이 BREAKING CHANGE를 포함하지 않는 한).
추가적인 문맥 정보를 제공하기 위한 목적으로 사용되는 적용 범위는 커밋의 타입에 덧붙여질 수 있는데 괄호 안에 포함됩니다, 예를 들면, feat(parser): add ability to parse arrays
.
예제설명과 BREAKING CHANGE 꼬리말을 가지는 커밋 메시지feat: allow provided config object to extend other configs
BREAKING CHANGE: `extends` key in config file is now used for extending other config files
단절적 변경(breaking change)에 주의를 주기 위해 !
를 포함한 커밋 메시지feat!: send an email to the customer when a product is shipped
단절적 변경(breaking change)에 주의를 주기 위해 적용 범위와 !
를 포함한 커밋 메시지feat(api)!: send an email to the customer when a product is shipped
BREAKING CHANGE 꼬리말과 !
를 함께 포함한 커밋 메시지chore!: drop support for Node 6
BREAKING CHANGE: use JavaScript features not available in Node 6.
본문이 없는 커밋 메시지docs: correct spelling of CHANGELOG
적용 범위를 가지는 커밋 메시지feat(lang): add polish language
다중-단락 본문과 다수의 꼬리말을 가진 커밋 메시지fix: prevent racing of requests
Introduce a request id and a reference to latest request. Dismiss
incoming responses other than from latest request.
Remove timeouts which were used to mitigate the racing issue but are
obsolete now.
Reviewed-by: Z
Refs: #123
규격
이 문서에서 언급되는 주요 단어들인 “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, 그리고 “OPTIONAL”는 RFC 2119에 기술된 그대로 해석해야 합니다.
- 모든 커밋은
feat
,fix
같은 명사로 된 접두어를 포함해야 하고 그 뒤로 선택 사항인 적용 범위, 선택 사항인!
, 그리고 필수인:
과 공백이 있어야 합니다. feat
타입은 커밋에 애플리케이션이나 라이브러리에 새로운 기능이 추가될 때 사용되어야 합니다.fix
타입은 커밋에 애플리케이션의 버그 수정을 하는 내용을 포함하는 경우에 사용되어야 합니다.- 적용 범위는 타입 다음에 기술하는데 이는 코드베이스가 적용되는 영역을 기술하는 명사로 괄호로 감싸져야 합니다, 예를 들어,
fix(parser):
- 설명은 타입/적용 범위 접두어 뒤에 있는 콜론(:)과 공백 다음에 작성되어야 합니다. 설명은 코드 변경 사항에 대한 짧은 요약입니다, 예를 들어, fix: array parsing issue when multiple spaces were contained in string.
- 더 긴 커밋 본문은 짧은 설명 다음에 위치할 수 있으며 코드 변경 사항에 대한 추가적인 문맥적인 정보를 제공합니다. 본문은 반드시 설명 다음에 빈 행으로 시작해야 합니다.
- 커밋 본문은 형식이 자유로우며 새 줄로 분리된 많은 수의 단락들로 구성 될 수 있습니다.
- 하나 또는 다수의 꼬리말들은 본문 다음 빈 행 다음에 위치합니다. 각각의 꼬리말은 반드시 단어 토큰, 그 뒤에
:<space>
또는<space>#
구분자, 그 뒤에 문자열 값으로 구성되어야 합니다(이것은 다음에 영향을 받았습니다 git trailer convention). - 꼬리말의 토큰은 반드시 공백 문자 대신
-
를 사용해야 합니다. 예를 들면Acked-by
(이것은 다중-단락 본문과 꼬리말 섹션을 구분하는데 도움이 됩니다).BREAKING CHANGE
는 예외적으로 토큰으로 사용될 수 있습니다. - 꼬리말의 값은 공백이나 새 줄들을 포함할 수 있으며, 구문 분석기는 다음의 유효한 꼬리말 토큰/구분자 쌍을 관찰하면 반드시 종료해야 합니다.
- 단절적 변경은 반드시 커밋의 타입/적용범위 접두어에 표시하거나 꼬리말에 기입되어야 합니다.
- 꼬리말로 포함된 경우 단절적 변경은 반드시 대문자 문자열 BREAKING CHANGE과 뒤따르는 콜론(:), 공백, 그리고 설명으로 구성되어야 합니다. 예를 들면 BREAKING CHANGE: environment variables now take precedence over config files.
- 타입/범위 접두어에 포함된 경우, 단절적 변경은 반드시
:
바로 앞의!
를 명시해야 합니다. 만약!
가 사용되면,BREAKING CHANGE:
는 꼬리말 섹션에서 생략할 수 있으며, 커밋 설명은 단절적 변경을 설명하기 위해 사용되어야 합니다. feat
와fix
이외의 타입이 커밋 메시지에 사용될 수 있습니다. 예: docs: updated ref docs.- Conventional Commit을 구성하는 정보의 단위는 반드시 대문자여야 하는 BREAKING CHANGES를 제외하고 구현자에 의해 대소문자를 구분하는 것으로 처리되어서는 안됩니다.
- BREAKING-CHANGE는 꼬리말에서 토큰으로 사용될 때 반드시 BREAKING CHANGE와 동의어야 합니다.
왜 Conventional Commits를 사용할까요?
- CHANGELOG를 자동으로 생성하기 위해서
- (포함된 커밋의 타입에 기반하여) 유의적 버전을 자동으로 변경하기 위해서
- 팀 동료, 타인, 그리고 기타 이해당사자에게 변화의 본질을 전달하기 위해서
- 빌드와 배포 프로세스를 수행하기 위해서
- 더 구조화된 커밋 히스토리를 보여줘서 사람들이 프로젝트에 기여하기 더 쉽도록 하기 위해서
FAQ초기 개발 단계에서 커밋 메시지를 어떻게 다루어야 하나요?
제품을 이미 출시한 것처럼 진행하세요. 일반적으로 누군가 는 여러분의 소프트웨어를 사용하고 있는데 그게 동료 개발자일 수도 있고 그들은 무엇이 고쳐졌는지, 무엇이 문제인지 등을 알고 싶어 할 것입니다.
커밋 제목에서 타입은 대문자로 쓰나요 소문자로 쓰나요?
대소문자 구분은 없지만 일관되게 사용하는 것이 좋습니다.
커밋이 커밋 타입 중 하나 이상에 해당하는 경우 어떻게 해야 하나요?
가능하면 돌아가서 여러 개의 커밋으로 쪼개세요. Conventional Commits의 이점 중 하나는 우리가 보다 조직화된 커밋과 PR을 만들도록 유도하는 능력입니다.
Conventional Commits가 빠른 개발과 빠른 반복을 방해하지 않나요?
Conventional Commits는 무질서한 방법으로 빨리 움직이는 것을 지양하고 다양한 기여자들을 가진 여러 프로젝트에서 장기적으로 빠르게 이동할 수 있도록 도와줍니다.
Conventional Commits가 개발자들로 하여금 제공된 타입 안에서 생각하게 되기 때문에 그들이 만든 커밋의 타입을 제한하도록 유도할 수 있을까요?
Conventional Commits는 fix 같은 특정 종류의 커밋 타입을 더 많이 만들도록 장려하고 있습니다. 그 외에도, Conventional Commits의 유연성은 여러분의 팀이 그들만의 타입을 고안하고 시간이 지남에 따라 그 타입을 바꿀 수 있게 해줍니다.
이것이 SemVer와 어떤 관련이 있나요?
fix
타입의 커밋은 PATCH
버전으로 번역해야 합니다. feat
형식 커밋은 MINOR
버전으로 번역해야 합니다. 타입과 관계없이 BREAKING CHANGE
를 포함한 커밋은 MAJOR
로 번역해야 합니다.
Conventional Commit 스펙을 개인적으로 확장한 형태의 버전을 어떻게 사용할 수 있을까요? 예를 들어, @jameswomack/conventional-commit-spec
SemVer를 사용해서 이 규격에 대한 사용자 자신의 확장판을 릴리즈할 것을 추천합니다. (그리고 이러한 확장판을 만드는 것을 권장합니다!)
실수로 잘못된 커밋 타입을 사용하면 어떻게 해야 하나요?스펙에 맞는 타입을 사용하고 있지만 올바른 타입이 아닌 경우, 예를 들어, feat
대신 fix
실수를 병합 또는 리베이스하기 전에, git rebase -i
를 사용하여 커밋 히스토리를 편집할 것을 권장합니다. 릴리즈 후에는 사용하는 툴과 프로세스에 따라 정리하는 방법이 다를 수 있습니다.
스펙에 맞지 않은 타입을 사용하는 경우, 예를 들어, feat
대신 feet
최악의 경우, Conventional Commmit 규격을 충족하지 않는 커밋이 추가되었다고 해서 그것이 세계의 종말을 의미하지 않습니다. 이는 커밋이 단순히 규격을 기반으로 하는 툴에 의해 누락된다는 것을 의미합니다.
모든 기여자가 Conventional Commit 규격을 사용해야 하나요?
아니요! Git을 기반으로 스쿼시를 사용하는 경우, 리드 유지관리자는 커밋된 메시지를 병합할 때 정리할 수 있으므로 일반 커밋자에 작업량이 추가되지 않습니다.
이에 대한 일반적인 작업 흐름은 Git 시스템이 자동으로 풀 요청에서 커밋되도록 하고 리드 유지관리자가 병합에 대한 적절한 Git 커밋 메시지를 입력할 수 있는 양식을 제시하도록 하는 것입니다.
Conventional Commits은 revert commits을 어떻게 다루어야 하나요?
코드를 되돌리는 것은 복잡해질 수 있습니다: 여러 개의 커밋을 되돌리고 있는가요? 기능을 되돌리는 경우 패치가 아니라 다음 릴리즈여야 하는가요?
Conventional Commits는 되돌리기 행동을 정의하기 위해 명확한 작업을 하지 않습니다. 툴 개발자에게 되돌리기를 다루는 로직 개발에 타입 과 꼬리말 의 유연함을 사용하도록 맡길 것입니다.
한 가지 권장 사항은 revert
타입과 되돌려지는 커밋들의 SHA들을 참조하는 꼬리말를 사용하는 것입니다:
revert: let us never again speak of the noodle incident
Refs: 676104e, a215868
Conventional Commits (English)
Conventional Commits 1.0.0Summary
The Conventional Commits specification is a lightweight convention on top of commit messages.
It provides an easy set of rules for creating an explicit commit history;
which makes it easier to write automated tools on top of.
This convention dovetails with SemVer,
by describing the features, fixes, and breaking changes made in commit messages.
The commit message should be structured as follows:
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]
The commit contains the following structural elements, to communicate intent to the consumers of your library:
- fix: a commit of the type
fix
patches a bug in your codebase (this correlates withPATCH
in Semantic Versioning). - feat: a commit of the type
feat
introduces a new feature to the codebase (this correlates withMINOR
in Semantic Versioning). - BREAKING CHANGE: a commit that has a footer
BREAKING CHANGE:
, or appends a!
after the type/scope, introduces a breaking API change (correlating withMAJOR
in Semantic Versioning).
A BREAKING CHANGE can be part of commits of any type. - types other than
fix:
andfeat:
are allowed, for example @commitlint/config-conventional (based on the Angular convention) recommendsbuild:
,chore:
,ci:
,docs:
,style:
,refactor:
,perf:
,test:
, and others. - footers other than
BREAKING CHANGE: <description>
may be provided and follow a convention similar to
git trailer format.
Additional types are not mandated by the Conventional Commits specification, and have no implicit effect in Semantic Versioning (unless they include a BREAKING CHANGE).
A scope may be provided to a commit's type, to provide additional contextual information and is contained within parenthesis, e.g., feat(parser): add ability to parse arrays
.
ExamplesCommit message with description and breaking change footerfeat: allow provided config object to extend other configs
BREAKING CHANGE: `extends` key in config file is now used for extending other config files
Commit message with !
to draw attention to breaking changefeat!: send an email to the customer when a product is shipped
Commit message with scope and !
to draw attention to breaking changefeat(api)!: send an email to the customer when a product is shipped
Commit message with both !
and BREAKING CHANGE footerchore!: drop support for Node 6
BREAKING CHANGE: use JavaScript features not available in Node 6.
Commit message with no bodydocs: correct spelling of CHANGELOG
Commit message with scopefeat(lang): add Polish language
Commit message with multi-paragraph body and multiple footersfix: prevent racing of requests
Introduce a request id and a reference to latest request. Dismiss
incoming responses other than from latest request.
Remove timeouts which were used to mitigate the racing issue but are
obsolete now.
Reviewed-by: Z
Refs: #123
Specification
The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in RFC 2119.
- Commits MUST be prefixed with a type, which consists of a noun,
feat
,fix
, etc., followed
by the OPTIONAL scope, OPTIONAL!
, and REQUIRED terminal colon and space. - The type
feat
MUST be used when a commit adds a new feature to your application or library. - The type
fix
MUST be used when a commit represents a bug fix for your application. - A scope MAY be provided after a type. A scope MUST consist of a noun describing a
section of the codebase surrounded by parenthesis, e.g.,fix(parser):
- A description MUST immediately follow the colon and space after the type/scope prefix.
The description is a short summary of the code changes, e.g., fix: array parsing issue when multiple spaces were contained in string. - A longer commit body MAY be provided after the short description, providing additional contextual information about the code changes. The body MUST begin one blank line after the description.
- A commit body is free-form and MAY consist of any number of newline separated paragraphs.
- One or more footers MAY be provided one blank line after the body. Each footer MUST consist of
a word token, followed by either a:<space>
or<space>#
separator, followed by a string value (this is inspired by the
git trailer convention). - A footer's token MUST use
-
in place of whitespace characters, e.g.,Acked-by
(this helps differentiate
the footer section from a multi-paragraph body). An exception is made forBREAKING CHANGE
, which MAY also be used as a token. - A footer's value MAY contain spaces and newlines, and parsing MUST terminate when the next valid footer
token/separator pair is observed. - Breaking changes MUST be indicated in the type/scope prefix of a commit, or as an entry in the
footer. - If included as a footer, a breaking change MUST consist of the uppercase text BREAKING CHANGE, followed by a colon, space, and description, e.g.,
BREAKING CHANGE: environment variables now take precedence over config files. - If included in the type/scope prefix, breaking changes MUST be indicated by a
!
immediately before the:
. If!
is used,BREAKING CHANGE:
MAY be omitted from the footer section,
and the commit description SHALL be used to describe the breaking change. - Types other than
feat
andfix
MAY be used in your commit messages, e.g., docs: update ref docs. - The units of information that make up Conventional Commits MUST NOT be treated as case sensitive by implementors, with the exception of BREAKING CHANGE which MUST be uppercase.
- BREAKING-CHANGE MUST be synonymous with BREAKING CHANGE, when used as a token in a footer.
Why Use Conventional Commits
- Automatically generating CHANGELOGs.
- Automatically determining a semantic version bump (based on the types of commits landed).
- Communicating the nature of changes to teammates, the public, and other stakeholders.
- Triggering build and publish processes.
- Making it easier for people to contribute to your projects, by allowing them to explore
a more structured commit history.
FAQHow should I deal with commit messages in the initial development phase?
We recommend that you proceed as if you've already released the product. Typically somebody, even if it's your fellow software developers, is using your software. They'll want to know what's fixed, what breaks etc.
Are the types in the commit title uppercase or lowercase?
Any casing may be used, but it's best to be consistent.
What do I do if the commit conforms to more than one of the commit types?
Go back and make multiple commits whenever possible. Part of the benefit of Conventional Commits is its ability to drive us to make more organized commits and PRs.
Doesn’t this discourage rapid development and fast iteration?
It discourages moving fast in a disorganized way. It helps you be able to move fast long term across multiple projects with varied contributors.
Might Conventional Commits lead developers to limit the type of commits they make because they'll be thinking in the types provided?
Conventional Commits encourages us to make more of certain types of commits such as fixes. Other than that, the flexibility of Conventional Commits allows your team to come up with their own types and change those types over time.
How does this relate to SemVer?
fix
type commits should be translated to PATCH
releases. feat
type commits should be translated to MINOR
releases. Commits with BREAKING CHANGE
in the commits, regardless of type, should be translated to MAJOR
releases.
How should I version my extensions to the Conventional Commits Specification, e.g. @jameswomack/conventional-commit-spec
?
We recommend using SemVer to release your own extensions to this specification (and
encourage you to make these extensions!)
What do I do if I accidentally use the wrong commit type?When you used a type that's of the spec but not the correct type, e.g. fix
instead of feat
Prior to merging or releasing the mistake, we recommend using git rebase -i
to edit the commit history. After release, the cleanup will be different according to what tools and processes you use.
When you used a type not of the spec, e.g. feet
instead of feat
In a worst case scenario, it's not the end of the world if a commit lands that does not meet the Conventional Commits specification. It simply means that commit will be missed by tools that are based on the spec.
Do all my contributors need to use the Conventional Commits specification?
No! If you use a squash based workflow on Git lead maintainers can clean up the commit messages as they're merged—adding no workload to casual committers.
A common workflow for this is to have your git system automatically squash commits from a pull request and present a form for the lead maintainer to enter the proper git commit message for the merge.
How does Conventional Commits handle revert commits?
Reverting code can be complicated: are you reverting multiple commits? if you revert a feature, should the next release instead be a patch?
Conventional Commits does not make an explicit effort to define revert behavior. Instead we leave it to tooling
authors to use the flexibility of types and footers to develop their logic for handling reverts.
One recommendation is to use the revert
type, and a footer that references the commit SHAs that are being reverted:
revert: let us never again speak of the noodle incident
Refs: 676104e, a215868
Angular commit conventions 전문 (2018)
Commit Message Format
Each commit message consists of a header, a body and a footer. The header has a special
format that includes a type, a scope and a subject:
<type>(<scope>): <subject>
<BLANK LINE>
<body>
<BLANK LINE>
<footer>
The header is mandatory and the scope of the header is optional.
Any line of the commit message cannot be longer 100 characters! This allows the message to be easier
to read on GitHub as well as in various git tools.
The footer should contain a closing reference to an issue if any.
Samples: (even more samples)
docs(changelog): update changelog to beta.5
fix(release): need to depend on latest rxjs and zone.js
The version in our package.json gets copied to the one we publish, and users need the latest of these.
Revert
If the commit reverts a previous commit, it should begin with revert:
, followed by the header of the reverted commit. In the body it should say: This reverts commit <hash>.
, where the hash is the SHA of the commit being reverted.
Type
Must be one of the following:
- build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
- ci: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
- docs: Documentation only changes
- feat: A new feature
- fix: A bug fix
- perf: A code change that improves performance
- refactor: A code change that neither fixes a bug nor adds a feature
- style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
- test: Adding missing tests or correcting existing tests
Scope
The scope should be the name of the npm package affected (as perceived by the person reading the changelog generated from commit messages.
The following is the list of supported scopes:
- animations
- common
- compiler
- compiler-cli
- core
- elements
- forms
- http
- language-service
- platform-browser
- platform-browser-dynamic
- platform-server
- platform-webworker
- platform-webworker-dynamic
- router
- service-worker
- upgrade
There are currently a few exceptions to the "use package name" rule:
- packaging: used for changes that change the npm package layout in all of our packages, e.g. public path changes, package.json changes done to all packages, d.ts file/format changes, changes to bundles, etc.
- changelog: used for updating the release notes in CHANGELOG.md
- aio: used for docs-app (angular.io) related changes within the /aio directory of the repo
- none/empty string: useful for
style
,test
andrefactor
changes that are done across all packages (e.g.style: add missing semicolons
)
Subject
The subject contains a succinct description of the change:
- use the imperative, present tense: "change" not "changed" nor "changes"
- don't capitalize the first letter
- no dot (.) at the end
Body
Just as in the subject, use the imperative, present tense: "change" not "changed" nor "changes".
The body should include the motivation for the change and contrast this with previous behavior.
Footer
The footer should contain any information about Breaking Changes and is also the place to
reference GitHub issues that this commit Closes.
Breaking Changes should start with the word BREAKING CHANGE:
with a space or two newlines. The rest of the commit message is then used for this.
A detailed explanation can be found in this document
Angular commit conventions 전문 (2025)
Commit Message Format
We have very precise rules over how our Git commit messages must be formatted.
This format leads to easier to read commit history and makes it analyzable for changelog generation.
Each commit message consists of a header, a body, and a footer.
<header>
<BLANK LINE>
<body>
<BLANK LINE>
<footer>
The header
is mandatory and must conform to the Commit Message Header format.
The body
is mandatory for all commits except for those of type "docs".
When the body is present it must be at least 20 characters long and must conform to the Commit Message Body format.
The footer
is optional. The Commit Message Footer format describes what the footer is used for and the structure it must have.
Commit Message Header<type>(<scope>): <short summary>
│ │ │
│ │ └─⫸ Summary in present tense. Not capitalized. No period at the end.
│ │
│ └─⫸ Commit Scope: animations|bazel|benchpress|common|compiler|compiler-cli|core|
│ elements|forms|http|language-service|localize|platform-browser|
│ platform-browser-dynamic|platform-server|router|service-worker|
│ upgrade|zone.js|packaging|changelog|docs-infra|migrations|
│ devtools
│
└─⫸ Commit Type: build|ci|docs|feat|fix|perf|refactor|test
The <type>
and <summary>
fields are mandatory, the (<scope>)
field is optional.
Type
Must be one of the following:
TypeDescriptionbuildChanges that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)ciChanges to our CI configuration files and scripts (examples: Github Actions, SauceLabs)docsDocumentation only changesfeatA new featurefixA bug fixperfA code change that improves performancerefactorA code change that neither fixes a bug nor adds a featuretestAdding missing tests or correcting existing testsScope
The scope should be the name of the npm package affected (as perceived by the person reading the changelog generated from commit messages).
The following is the list of supported scopes:
animations
bazel
benchpress
changelog
common
compiler
compiler-cli
core
dev-infra
devtools
docs-infra
elements
forms
http
language-service
localize
migrations
packaging
platform-browser
platform-browser-dynamic
platform-server
router
service-worker
upgrade
zone.js
There are currently a few exceptions to the "use package name" rule:
packaging
: used for changes that change the npm package layout in all of our packages, e.g. public path changes, package.json changes done to all packages, d.ts file/format changes, changes to bundles, etc.changelog
: used for updating the release notes in CHANGELOG.mddev-infra
: used for dev-infra related changes within the directories /scripts and /toolsdocs-infra
: used for docs-app (angular.dev) related changes within the /adev directory of the repomigrations
: used for changes to theng update
migrations.devtools
: used for changes in the browser extension.- none/empty string: useful for
test
andrefactor
changes that are done across all packages (e.g.test: add missing unit tests
) and for docs changes that are not related to a specific package (e.g.docs: fix typo in tutorial
).
Summary
Use the summary field to provide a succinct description of the change:
- use the imperative, present tense: "change" not "changed" nor "changes"
- don't capitalize the first letter
- no dot (.) at the end
Commit Message Body
Just as in the summary, use the imperative, present tense: "fix" not "fixed" nor "fixes".
Explain the motivation for the change in the commit message body. This commit message should explain why you are making the change.
You can include a comparison of the previous behavior with the new behavior in order to illustrate the impact of the change.
Commit Message Footer
The footer can contain information about breaking changes and deprecations and is also the place to reference GitHub issues and other PRs that this commit closes or is related to.
For example:
BREAKING CHANGE: <breaking change summary>
<BLANK LINE>
<breaking change description + migration instructions>
<BLANK LINE>
<BLANK LINE>
Fixes #<issue number>
or
DEPRECATED: <what is deprecated>
<BLANK LINE>
<deprecation description + recommended update path>
<BLANK LINE>
<BLANK LINE>
Closes #<pr number>
Breaking Change section should start with the phrase BREAKING CHANGE:
followed by a brief summary of the breaking change, a blank line, and a detailed description of the breaking change that also includes migration instructions.
Similarly, a Deprecation section should start with DEPRECATED:
followed by a short description of what is deprecated, a blank line, and a detailed description of the deprecation that also mentions the recommended update path.
Revert commits
If the commit reverts a previous commit, it should begin with revert:
, followed by the header of the reverted commit.
The content of the commit message body should contain:
- information about the SHA of the commit being reverted in the following format:
This reverts commit <SHA>
, - a clear description of the reason for reverting the commit message.