4 ms·
there are pros and cons to both verb-first and subject-first commit styles. verb-first commits can be organised in a few categories. since they are few commit
by egnehots 3y ago
there are pros and cons to both verb-first and subject-first commit styles.
verb-first commits can be organised in a few categories.
since they are few commit verbs (fix, add, refact..), always use the same verb prefix for bug, features messages and you will have nice categories to scan/filter:
- add feature
- fix bug
- refactor logic
On the other hand, subject-first indeed put the important part first and let you search for a term:
- Instance configure template method called from constructor
- Store's project method is an alias for fetch
- Title is changed
Depending on the use case, are you often searching for something? or would you like to highligh the nb of bugs/features in the last release?, one style is better suited than the other.
For important changes, I like the linux kernel style:
oneline summary, details (problem, impact, solution..)
https://docs.kernel.org/process/submitting-patches.html https://docs.kernel.org/process/submitting-patches.html