当前位置:网站首页>【无标题】
【无标题】
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):新增获取屏幕参数工具类”
边栏推荐
- 效应与定律
- ES6 deconstruction assignment rename
- 绕过技术聊'跨端'......
- Day_ 04
- Cocoapods installation in 2021
- 20省市公布元宇宙路线图
- Deadlock, thread communication, singleton mode
- Unity技术手册 - 生命周期旋转RotationOverLifetime-速度旋转RotationBySpeed-外力ExternalForces
- Mac PHP multi version management and swoole extension installation
- Error: homebrew core is a shallow clone
猜你喜欢

【NLP】今年英语高考,CMU用重构预训练交出134高分,大幅超越GPT3

Day_ thirteen

炮打司令部,别让一个UI框架把你毁了

Kalman Filter 遇到 Deep Learning : 卡尔曼滤波和深度学习有关的论文

使用PyWebIO测试,刚入门的测试员也能做出自己的测试工具

Precautions for function default parameters (formal parameter angle)

加密潮流:时尚向元宇宙的进阶

Perfect shuffle problem

Day_ 04

This latest research has revealed two secrets of cloudy development
随机推荐
APIJSON简单使用
心楼:华为运动健康的七年筑造之旅
[proficient in high concurrency] deeply understand the basis of C language and C language under assembly
论文笔记:LBCF: A Large-Scale Budget-Constrained Causal Forest Algorithm
1-8Vmware中的文件共享
论文笔记:Generalized Random Forests
et al和etc区别
1-8file sharing in VMWare
Record learning of hystrix knowledge --20210929
【精通高并发】深入理解汇编语言基础
[100 questions of Blue Bridge Cup intensive training] scratch command mobile Blue Bridge Cup scratch competition special prediction programming question intensive training simulation exercise question
WPF开发随笔收录-心电图曲线绘制
Uniapp to preview pictures (single / multiple)
Prototype chain analysis
Day_ 16 set
Preliminary understanding of JVM
数字经济时代文化消费新特征
First knowledge of database
Xinlou: un voyage de sept ans de Huawei Sports Health
Cocoapods installation in 2021