Try   HackMD

Git commit規範

Commit Message 就像是寫程式要寫註解一樣,好的Commit Message 會節省看 Code 的時間。

範例

* feat: 新增信件通知功能
* 因應需求新增功能:
    - 第一次成功登入,變更密碼,須寄發email通知
    - 所有消費行為皆須email通知
Asana #s4_XX

結構說明

* <type>: <summary>
* <why>:
    - <do what>
    - <do what>
<issue no.>

type類別

type Description
feat 新增 / 修改功能
fix 修補bug
docs 文件
style 不影響功能的樣式、格式變動,white-space, formatting
chore 建構程序或輔助工具的變動
revert 撤回先前的commit

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
type 能讓Code Review人員知道該用什麼角度檢視Commit內容,進而提升Code Review效率。


參考資料:Git Commit Message 這樣寫會更好,替專案引入規範與範例

tags: frontend git Back to Front End Homepage
Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →