我在我的項目中使用了TDD。
我寫了一個測試,看它失敗,編寫代碼讓它變綠並且使用Git。
我已閱讀關於提交第一次開發的內容,但我不明白如何使用此工作流程執行此操作。
如果我正在測試一個應用程序層(如Service或Repository),我應該在提交中寫什麼樣的評論,以便讓其他人看起來更好?
我應該寫測試的名字嗎? 你是如何處理這個問題的?TDD&Git commit comments
回答
提交TDD更改應該與任何其他更改沒有區別。因此,您對提交消息應用相同的規則。
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
- 1. 如何搜索git commit comments?
- 2. git commit -m vs git commit -am
- 3. git-svn dmitmiting git commit
- 4. SLOC在git commit
- 5. Git commit問題
- 6. 撤消git commit
- 7. Git revert lastet commit
- 8. git commit integrity
- 9. Git submodule commit
- 10. Git commit date
- 11. Git pre-commit hook
- 12. Git commit命令
- 13. Aptana 3 git commit
- 14. Git commit patches
- 15. Git commit id lost
- 16. git find fat commit
- 17. git commit problems
- 18. git commit - 格式?
- 19. Git post commit mails
- 20. git commit directory
- 21. 刪除git commit
- 22. (git add -A後跟git commit)和git commit -a之間的區別?
- 23. 從commit-comments生成更新日誌 - 壞主意?
- 24. 結合git add。和git commit
- 25. git commit to github repo
- 26. Git rebase to older commit
- 27. Xcode git commit崩潰
- 28. git commit to all branches
- 29. 撤消git commit --amend
- 30. git post-commit鉤子