728x90
깃 커밋 컨벤션
우아한 테크 코스 과제에서 '커밋 메시지 컨벤션'가이드를 참고하여 커밋 메시지를 작성할 것을 요구하였다.
그간 나중으로 미뤄오고 대충 날짜에 무엇을 했는지만 작성하였던 나의 깃 커밋 컨벤션을 고칠 수 있는 좋은 기회라고 생각했다.
# 그동안 처참했던 나의 커밋 기록 예
221107 프로그래머스 완주하지 못한 선수
221107 패스 표현식 수정
커밋 메세지 형식
커밋 메세지의 구조는 제목, 본문, 꼬리말로 이루어져 있습니다.
각 줄을 100자를 넘을 수 없습니다.
<type>(<scope>): <제목>
<빈 줄>
<body>
<빈 줄>
<footer>
제목
- 제목 줄에는 변경 사항에 대한 간결한 설명만을 작성한다.
<type> 종류
- feat : 새로운 기능 추가
- fix : 버그 수정
- docs : 문서 수정
- style : 코드 포맷팅, 세미콜론 누락 등
- refactor : 코드 리팩터링
- test : 테스트 코드, 누락된 테스트를 추가
- chore : 빌드 업무 수정, 유지 보수 등
<scope> 작성
커밋 변경 위치를 지정합니다.
- $location, $browser, $compile, $rootScope, ngHref, ngClick, ngView 등...
제목 작성
- <type>(<scope>):'공백' 제목
- 명령형, 현재 시제를 사용한다.
- "변경했음", "변경 중"이 아닌, "변경"
- "생성했음", "생성 중"이 아닌, "생성"
- "Fixed"가 아닌, "Fix"
- 첫 글자를 대문자로 쓰지 않습니다.
- 끝에 점(.)을 사용하지 않습니다.
본문
- 제목과 동일하게 현재 시제를 사용합니다.
- 첫 번째 줄은 50자 내 짧은 설명을 작성합니다.
- 이전과 비교하여 무엇이 변하였는지, 왜 변하였는지 작성합니다.
꼬리말
주요 변경 사항
모든 주요 변경 사항은 변경 사항에 대한 설명, 근거, 마이그레이션 참고 사항과 함께 언급되어야 합니다
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.
참조 예제
해결된 다음과 같이 "Close"키워드를 접두사로 사용하여 바닥글의 별도 줄에 작성합니다.
Closes #123
여러 문제를 작성해야 하는 경우는 다음과 같이 작성합니다.
Closes #123, # 234, #9999
예시
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($compile): simplify isolate scope bindings
Changed the isolate scope binding options to:
- @attr - attribute binding (including interpolation)
- =model - by-directional model binding
- &expr - expression execution binding
This change simplifies the terminology as well as
number of choices available to the developer. It
also supports local name aliasing from the parent.
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.
참조
https://gist.github.com/stephenparish/9941e89d80e2bc58a153
https://365git.tumblr.com/post/3308646748/writing-git-commit-messages
반응형
'Server > ETC.' 카테고리의 다른 글
[Github] Pull Request (0) | 2023.07.02 |
---|---|
[Github] Issue 생성 (0) | 2023.07.02 |
[Postman] DTO와 File을 동시에 전송하는 법 (1) | 2023.01.27 |
[GitLab] Branch CI/CD Pass 하는 방법 (0) | 2023.01.25 |
[GitLab&GitHub] GitLab 작업을 GitHub에 연동하기, 미러링 (0) | 2022.12.23 |