# 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 | :bulb: type 能讓Code Review人員知道該用什麼角度檢視Commit內容,進而提升Code Review效率。 --- 參考資料:[Git Commit Message 這樣寫會更好,替專案引入規範與範例](https://wadehuanglearning.blogspot.com/2019/05/commit-commit-commit-why-what-commit.html?fbclid=IwAR3nQ_HOb8i4NTPOL1uc1Jh3QWf-4MtHjkZ1Ek03SJJ824IAPBzHVu_9FNk) ###### tags: `frontend` `git` [:arrow_right: Back to Front End Homepage :arrow_left:](/S-c0eqQmS16D8tcTx4ae1g)
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up