시작하기

우리의 커밋 규칙을 배워보세요

2 min read
•400 words

우리는 깔끔한 프로젝트 이력을 갖는 걸 좋아해. 우리의 커밋 규칙은 Conventional Commits에서 영감을 받았지만, 더 시각적이고 재밌게 만들기 위해 gitmoji로 커스터마이즈했어.

구조

커밋 메시지는 다음과 같이 구조화되어야 해, 그리고 소문자로 작성해야 해:

<gitmoji> <type> <description> [(#<issue number>)]

[optional body]

[optional footer(s)]

예시

📝 update documentation contributors

- Add @jerembdn as a contributor
- Add @younesbessa as a contributor

Co-authored-by: Younes Bessa <[email protected]>

대부분의 경우, 간단한 한 줄이면 충분해:

📝 update documentation contributors

타입

우리는 다음과 같은 커밋 타입을 사용해:

TypeDescription
add새로운 기능 추가
fix버그 수정
improve뭔가 개선
update뭔가 업데이트
remove뭔가 제거
refactor뭔가 리팩토링
rename뭔가 이름 변경
move파일이나 폴더 이동
upgrade의존성 업그레이드
downgrade의존성 다운그레이드
initial저장소의 초기 커밋
release릴리즈 / 버전 태그

저장소의 첫 번째 커밋은 initial을 사용하고, 버전 태그는 release를 사용해:

🎉 initial commit
🔖 release @onruntime/translations v0.3.0

설명

<type>은 주어의 동사이고, 설명이 그것을 완성해. 함께 읽으면 한 문장이 돼:

# 좋은 예
📝 update documentation contributors

그래서 설명을 두 번째 동사로 열지 마. 타입이 이미 하나 있고, 주어가 두 문장을 쌓이게 만드는 게 fix: 접두사로 이어져. 동사를 빼고 그것이 작용한 것을 유지해:

# 나쁜 예
💄 improve scale down the gem on its card
🐛 fix stop the footer from wrapping

# 좋은 예
💄 improve the gem size on its card
🐛 fix the footer wrapping

명령형과 소문자로 작성해:

# 나쁜 예
📝 updated documentation contributors

# 나쁜 예
📝 Update documentation contributors

명사가 되는 동사

어떤 단어는 둘 다 될 수 있어, 네가 의도하는 건 명사야: ✨ add open graph image는 괜찮아. 동사로 읽히면, 관사가 다시 명사 구로 만들어: ✨ add a show more button.

이슈 번호

이슈 번호를 추가해 커밋을 이슈에 연결해:

📝 update documentation contributors (#123)

본문

상황과 동기를 위해 본문을 사용해:

📝 update documentation contributors

- Add @jerembdn as a contributor
- Add @younesbessa as a contributor

Co-authored-by: Younes Bessa <[email protected]>

한 커밋, 한 목적

각 커밋은 하나의 논리적 변화를 나타내야 해. 관련이 없는 변화를 섞지 마.