Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | |||
| 5 | 6 | 7 | 8 | 9 | 10 | 11 |
| 12 | 13 | 14 | 15 | 16 | 17 | 18 |
| 19 | 20 | 21 | 22 | 23 | 24 | 25 |
| 26 | 27 | 28 | 29 | 30 |
Tags
- OOM
- 프로그래머스
- 서버 꺼짐
- LV2
- 우테코
- docker
- 프로젝트
- fastapi
- 커밋 메시지
- mysql
- 부트스트랩
- 코딩테스트
- openAI
- spring boot
- llm
- 쿠키로그인
- Java
- 로그인
- 해외봉사
- cors
- 네팔
- Spring
- 게시판
- 회고
- 알고리즘
- springboot
- Dockerfile
- crud
- Lv.2
- 세션로그인
Archives
- Today
- Total
s00jin 님의 블로그
Git 커밋 메시지 정리본 본문
우테코 프리코스에서는 커밋 메시지를 준수해야한다고 한다..!
AngularJS Git Commit Message Conventions 의 커밋 메시지를 참고 작성하라고 하는데..
나는 영알못이라…. 원활한 미션 진행을 위해 나름의 번역을 통해 정리본을 만들었다.
커밋 메시지 목표
- 스크립트로 CHANGELOG.md 생성
- 중요한 커밋이 아닌 것들을 git bisect 로 무시
- 커밋 기록을 확인할 때 더 나은 정보 제공
CHANGELOG.md 생성
마지막 릴리즈 이후 모든 Subjects list (커밋 메시지의 첫 줄) 목록 출력:
git log <last tag> HEAD --pretty=format:%s
이 릴리스의 새로운 기능만 출력:
git log <last release> HEAD --grep feature
- —grep feature
- 커밋 메시지 안에 feature을 검색 (즉, feature이 들어간 커밋들만 검색 후 출력)
—grep <검색어>
커밋 메세지들에서 검색어가 포함된 애들만 출력해주는 것 같다
중요하지 않은 커밋 식별
- 포매팅 변화 (공백/ 빈 줄 추가/ 제거, 들여쓰기)
- 세미콜론 누락
- 주석 등
변경 내역을 조회할 때 중요하지 않은 커밋 무시 = git bisect 사용
git bisect skip $( git rev-list --grep irrelevant <good place> HEAD )
- ‘irrelevant’ 라는 문구가 있는 커밋은 무시
커밋 메시지의 형식
<type>(<scope>): <subject> # Subject line
<BLANK LINE> # 빈줄
<body> # Message body
<BLANK LINE> # 빈줄
<footer> # Message footer
- Subject line, Message body, Message footer로 구분됨
- 각 부분은 빈 줄로 구분
- 대개의 경우 Subject line으로만 작성되기도 함
- Message body와 Message footer는 선택
- 한 줄에 100자를 넘기지 않아야 함
Subject line
변경 사항에 대한 간략한 설명이 포함됨
<type>
- feat - 새로 추가된 기능
- fix - 버그 수정
- docs - 문서 관련
- style - 포매팅, 세미콜론 누락 등
- refactor - 리팩토링
- test - 테스트 관련
- chore - 그 외 자잘한 수정
<scope>
커밋 변경사항이 있는 위치를 지정하는 무엇이든 올 수 있음
ex) $location, $browser, $compile, $rootScope, $ngHref, $ngClick, $ngView 등
커밋이 영향을 주는 파일이나 기능 단위를 표현해도 됩니다 ex) login, signup, api, home, user-service, router 등
<subject>
- 명령형, 현재 시제 사용
- ✅ change, ❌ changed, ❌ changes
- 대문자로 시작하지 않기
- 끝에 . (마침표) 붙이지 않기
Message body (선택적 작성)
- 명령형, 현재 시제 사용
- ✅ change, ❌ changed, ❌ changes
- 변화에 대한 동기(이유)를 작성해야 함
- 이전과 변화 후의 차이를 기재
Message footer (선택적 작성)
주요 변경 내역과 어떤 이슈를 해결했는지 기재
Breaking changes
변경점, 변경 사유, 마이그레이션 지시(description of the change, justification and migration notes)가 언급되어야 함
예시
BREAKING CHANGE: isolate scope bindings definition has changed and
the inject option for the directive controller injection was removed.
To migrate the code follow the example below:
Before:
scope: {
myAttr: 'attribute',
myBind: 'bind',
myExpression: 'expression',
myEval: 'evaluate',
myAccessor: 'accessor'
}
After:
scope: {
myAttr: '@',
myBind: '@',
myExpression: '&',
// myEval - usually not useful, but in cases where the expression is assignable, you can use '='
myAccessor: '=' // in directive's template change myAccessor() to myAccessor
}
The removed `inject` wasn't generaly useful for directives so there should be no code using it.
Referencing issues
해결된 이슈도 Closes#<이슈번호> 를 사용하여 기재
Closes #123
// 해결된 이슈 여러개
Closes #123, #234, #345
예시
feat($browser): onUrlChange event (popstate/hashchange/polling)
Added new event to $browser:
- forward popstate event if available
- forward hashchange event if popstate not available
- do polling when neither popstate nor hashchange available
Breaks $browser.onHashChange, which was removed (use onUrlChange instead)
fix($compile): couple of unit tests for IE9
Older IEs serialize html uppercased, but IE9 does not...
Would be better to expect case insensitive, unfortunately jasmine does
not allow to user regexps for throw expectations.
Closes #392
Breaks foo.bar api, foo.baz should be used instead
feat(directive): ng:disabled, ng:checked, ng:multiple, ng:readonly, ng:selected
New directives for proper binding these attributes in older browsers (IE).
Added coresponding description, live examples and e2e tests.
Closes #351
style($location): add couple of missing semi colons
docs(guide): updated fixed docs from Google Docs
Couple of typos fixed:
- indentation
- batchLogbatchLog -> batchLog
- start periodic checking
- missing brace
참고 링크
Git Commit Message Conventions
'우아한테크코스' 카테고리의 다른 글
| [오픈미션] 리액트 공부 3 (0) | 2025.11.24 |
|---|---|
| [오픈미션] 리액트 공부 2 (0) | 2025.11.24 |
| [오픈미션] 리액트 공부 1 (0) | 2025.11.24 |
| [오픈미션] Javascript 공부 (0) | 2025.11.24 |
| [회고] 1주차 프리코스 회고 (0) | 2025.10.22 |