Quantcast
Channel: Programming – Gea-Suan Lin's BLOG
Viewing all articles
Browse latest Browse all 102

Conventional Commits

$
0
0

查資料的時候翻到的,寫 commit 常有 feat: 或是 fix: 這樣的 prefix,剛剛才突然想到這應該是有人訂規範的,翻了一下應該是「Conventional Commits」這個,裡面也引用了另外一個專案:「commitlint」。

所以 type 的部分可以有很多種類,剛剛前面提到的 feat: 以及 fix: 都在裡面:

build
chore
ci
docs
feat
fix
perf
refactor
revert
style
test

對於有規範用英文寫 commit log 的單位可以直接套用,不算太複雜。

馬上想到的好處大概是這樣對於 junior engineer 可以很自然的把 fixfeat 拆開 (其他的也類似),而且對於 code reviewer 也可以注意變化。


Viewing all articles
Browse latest Browse all 102