一个Git Commit Message模板

一个统一的commit消息模板可以约束团队成员使用一致的方式提交变更信息,这样也方便集成工具进行合规检查。 通常来讲,commit信息应该包含如下内容:

():

type表示commit类型,可选值如下: 1.feat: A new feature 2.fix: A bug fix 3.docs: Documentation only changes 4.style: Changes that do not affect the meaning of the code (white-space, formatting, etc) 5.refactor: A code change that neither fixes a bug nor adds a feature 6.perf: A code change that improves performance 7.test: Adding missing tests or correcting existing tests 8.build: Changes that affect the build system or external dependencies (e.g: gulp, npm) 9.ci:Changes to our CI configuration files and scripts (e.g: Travis, Circle, BrowserStack) 10.chore: Other changes that don’t modify src or test files 11.revert: Reverts a previous commit

scope表示影响范围,如:route, component, utils, build等 subject表示commit概述,建议符合50/72 formatting body表示具体修改的内容,可以分为多行,每一行建议符合50/72 formatting footer是一些备注信息, 通常是BREAKING CHANGE或修复的BUG


比丘资源网 » 一个Git Commit Message模板

发表回复

提供最优质的资源集合

立即查看 了解详情