2013-09-26 4 views
0

내 프로젝트에서 TDD를 사용하고 있습니다.
필자는 테스트를 작성하고, 실패했는지 확인하고, 코드를 작성하여 초록색으로 만들고, 힘내기로 커밋한다.
첫 번째 개발 커밋에 대해 읽었지만이 워크 플로를 수행하는 방법을 이해하지 못합니다.
(서비스 또는 저장소와 같은) 응용 프로그램 계층을 테스트하는 경우 다른 사람에게 잘 보이기 위해 커밋에 어떤 종류의 주석을 써야합니까?
테스트의 이름을 써야합니까? 어떻게 처리합니까?TDD & Git 커밋 코멘트

답변

1

TDD 변경에 대한 커밋은 다른 변경 사항과 동일해야합니다. 따라서 커밋 메시지에 대해 동일한 규칙을 적용합니다.

여기 an example from tpope입니다 :

Capitalized, short (50 chars or less) summary

More detailed explanatory text, if necessary. Wrap it to about 72 characters or so. In some contexts, the first line is treated as the subject of an email and the rest of the text as the body. The blank line separating the summary from the body is critical (unless you omit the body entirely); tools like rebase can get confused if you run the two together.

Write your commit message in the imperative: "Fix bug" and not "Fixed bug" or "Fixes bug." This convention matches up with commit messages generated by commands like git merge and git revert.

Further paragraphs come after blank lines.

- Bullet points are okay, too

- Typically a hyphen or asterisk is used for the bullet, preceded by a single space, with blank lines in between, but conventions vary here

- Use a hanging indent