본문 바로가기
Git , Github

[ Git ] Git Commit Message Conventions

by ウリ김영은 2023. 10. 22.

Format of the commit message

  • 커밋 메세지는 100자 이내로 작성한다.
<type>(<scope>): <subject>
<BLANK LINE>
<body>
<BLANK LINE>
<footer>

Subject line

  • 변경 사항을 간략하게 적는다.
    • 현재형으로 쓴다: "change" not "changed"/"changes"
    • 첫 글자를 대문자로 쓰지 않는다.
    • 마지막에 . 을 쓰지 않는다.

Allowed <type>

  • feat (feature): 기능
  • fix (bug fix): 버그 수정/고침
  • docs (documentations): 문서 작업
  • style (formatting, missing semi colons,...): 간격, 빈 줄 없애기, 들여쓰기, 세미콜론 추가 등등
  • refactor
  • test (when adding missing tests)
  • chore (maintain)

Allowed <scope>

  • 커밋변화 위치를 설명하는 어떤 것이든 다 가능
  • ex) $LOCATION , $BROWSER , $COMPILE, $ROOTSCOPE, NGHREF, NGCLICK, NGVIEW, ETC...

Message body

  • 현재형으로 쓴다.
  • 바꾼 의도/이유와 이전 코드와의 차이를 포함한다.

Message footer

Breaking changes

  • 모든 breaking changes는 footer에서 코드 변화, 이유, 마이그레이션 노트에 대한 세부 내용이 적혀있어야 한다.
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

  • closed 된 버그들은 footer에 개별적인 라인에 키워드"Closes"를 써야 한다.
Closes #234

Examples

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
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
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
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

 

AngularJS Git Commit Message Conventions

AngularJS Git Commit Message Conventions. GitHub Gist: instantly share code, notes, and snippets.

gist.github.com

 

'Git , Github' 카테고리의 다른 글

[ Git ] Git Commands Every Software Engineer Should know  (0) 2023.11.11
[ Git ]git init 취소하기  (0) 2023.11.03
[ Git ] git mirror  (0) 2023.10.25