当前位置:网站首页>【无标题】
【无标题】
2022-06-25 16:23:00 【小李科技】

规范
git commit -m “message”
其中message应该包含三个重要信息:():也即是类型、范围、主题。
type作为必选参数,主要有如下参考:
表示此次提交的代码修改的类型,有可能是bugfix、test…
subject:简短的描述性内容,可以是中文、也可以是英文、但还是不太建议中英结合的方式。
scope:表示提交的代码的影响面,最好还是带上这个参数;可能是某个类、管理器(Manager)、控制器、视图(UI)等等。
fix:出现频率最高,没有之一,写的每一行都是bug。字段表示Bug修复,无论是代码review时发现还是测试部门提交的Bug,问题修复完毕使用此type提交。
merge:代码合并,当然最好是描述出从哪个分支合并到哪个分支。
docs:提交只涉及文档的修改。
test:增加相关测试,或者对现有的测试修改。
revert:回退到上一个版本,可以描述出回退的原因。
refactor:代码的重构,可以理解为比如对代码中if-else进行重构,减少这种代码,这里并不涉及新功能的增加,当然重构不代表性能的提升(可能是结构清晰)。
perf:代码优化,性能提升,或者用户体验提升。像时间复杂度从 O(n) 优化到 O(1) 这是明显的提升。
feat:也即是feature,代表新功能的增加。
示例
//修复bug
git commit -m “fix(MainActivity):吐司传入上下文修改”
//新增功能
git commit -m “feat(Manager):新增获取屏幕参数工具类”
边栏推荐
- JVM memory structure
- Day_ 16 set
- Apijson simple to use
- Paper notes: lbcf: a large scale budget constrained causal forest algorithm
- _ 19_ IO stream summary
- 什么是骨干网
- 論文筆記:LBCF: A Large-Scale Budget-Constrained Causal Forest Algorithm
- Structure de la mémoire JVM
- 20省市公布元宇宙路线图
- Reverse series to obtain any wechat applet code
猜你喜欢

Bombard the headquarters. Don't let a UI framework destroy you

JVM memory structure

万卷书 - 大力娃的书单

Swift responsive programming

Generate post order traversal according to pre order traversal and mid order traversal

20省市公布元宇宙路线图

Record learning of hystrix knowledge --20210929

深入理解和把握数字经济的基本特征

mysql使用过程中遇到的问题

Optimization of lazyagg query rewriting in parsing data warehouse
随机推荐
2022-06-17 网工进阶(九)IS-IS-原理、NSAP、NET、区域划分、网络类型、开销值
[untitled]
什么是骨干网
3. conditional probability and independence
居家办公让我绩效拿了C | 社区征文
Process control and method
绕过技术聊'跨端'......
[proficient in high concurrency] deeply understand the basics of assembly language
JVM內存結構
炮打司令部,别让一个UI框架把你毁了
How to view the change trend of cloud database from the behind of the launch of tidb to Alibaba cloud
【效率】又一款笔记神器开源了!
卡尔曼时间序列预测
【NLP】今年英语高考,CMU用重构预训练交出134高分,大幅超越GPT3
Read mysql45 lecture - index
Reading mysql45 lecture - index continued
Servlet details
Collection overview, array encapsulation
Day_ seventeen
解析数仓lazyagg查询重写优化