Open soda-x opened 6 years ago
Ref: https://gitmoji.carloscuesta.me/
如上这个 emoji commit message 指引感觉非常好,所以大致翻译了下和大家分享
出发点源于最近在梳理和制定一套标准化且规范化开发细则,其中如何管理 commit 就是其中很重要的一个环节
借鉴了 angular 开发的规范,目前也是比较大规模使用的。
在指引文档中其中有一点涉及
Subject The subject contains succinct description of the change: use the imperative, present tense: "change" not "changed" nor "changes" don't capitalize first letter no dot (.) at the end
Subject The subject contains succinct description of the change:
其中就有 use the imperative, present tense,回过头想其实平时开发中很少有同学能把一些关键信息用简易且关键的英文动词来描述清楚此次 commit 的动机,而这篇指引一方面用了 emoji 这种形象化的方式外,关键多了解释说明,让我们这种英文不好的同学也能快速掌握到要领,同时可以把这些点,适用到 Subject 中。
use the imperative, present tense
:art: :art: Improving structure / format of the code. 改进目录或代码结构 / 格式化代码
:art:
:zap: :zap: Improving performance. 提升性能
:zap:
:fire: :fire: Removing code or files. 移除代码或文件
:fire:
:bug: :bug: Fixing a bug. 修复 bug
:bug:
:ambulance: :ambulance: Critical hotfix. 紧急修复
:ambulance:
:sparkles: :sparkles: Introducing new features. 新 feature
:sparkles:
:memo: :memo: Writing docs. 书写文档
:memo:
:rocket: :rocket: Deploying stuff. 部署相关
:rocket:
:lipstick: :lipstick: Updating the UI and style files. 更新 UI 和 样式文件
:lipstick:
:tada: :tada: Initial commit. 首次提交
:tada:
:white_check_mark: :white_check_mark: Adding tests. 新增测试用例
:white_check_mark:
:lock: :lock: Fixing security issues. 修复安全性问题
:lock:
:apple: :apple: Fixing something on macOS. 修复 macOS 平台上的缺陷
:apple:
:penguin: :penguin: Fixing something on Linux. 修复 Linux 平台上的缺陷
:penguin:
:checkered_flag: :checkered_flag: Fixing something on Windows. 修复 Windows 平台上的缺陷
:checkered_flag:
:robot: :robot: Fixing something on Android. 修复 Android 上的缺陷
:robot:
:green_apple: :green_apple: Fixing something on iOS. 修复 iOS 上的缺陷
:green_apple:
:bookmark: :bookmark: Releasing / Version tags. 发布 / 给代码打版本化的 tag
:bookmark:
:rotating_light: :rotating_light: Removing linter warnings. 移除 linter 的警告
:rotating_light:
:construction: :construction: Work in progress. 开发进行时
:construction:
:green_heart: :green_heart: Fixing CI Build. 修复 CI 问题
:green_heart:
:arrow_down: :arrow_down: Downgrading dependencies. 降级依赖版本
:arrow_down:
:arrow_up: :arrow_up: Upgrading dependencies. 升级依赖版本
:arrow_up:
:pushpin: :pushpin: Pinning dependencies to specific versions. 锁死依赖版本
:pushpin:
:construction_worker: :construction_worker: Adding CI build system. 添加 CI
:construction_worker:
:chart_with_upwards_trend: :chart_with_upwards_trend: Adding analytics or tracking code. 添加分析或埋点代码
:chart_with_upwards_trend:
:recycle: :recycle: Refactoring code. 代码重构
:recycle:
:heavy_minus_sign: :heavy_minus_sign: Removing a dependency. 移除依赖
:heavy_minus_sign:
:whale: :whale: Work about Docker. Docker 相关事由
:whale:
:heavy_plus_sign: :heavy_plus_sign: Adding a dependency. 添加一个依赖
:heavy_plus_sign:
:wrench: :wrench: Changing configuration files. 修改一个配置文件
:wrench:
:globe_with_meridians: :globe_with_meridians: Internationalization and localization. 国际化和本地化
:globe_with_meridians:
:pencil2: :pencil2: Fixing typos. 修正拼写错误
:pencil2:
:hankey: :hankey: Writing bad code that needs to be improved. 需要改进的代码,先上后续再重构
:hankey:
:rewind: :rewind: Reverting changes. 回滚变更
:rewind:
:twisted_rightwards_arrows: :twisted_rightwards_arrows: Merging branches. 分支合并
:twisted_rightwards_arrows:
:package: :package: Updating compiled files or packages. 更新打包后的文件或者包
:package:
:alien: :alien: Updating code due to external API changes. 外部依赖 API 变更导致的代码变更
:alien:
:truck: :truck: Moving or renaming files. 移动或重命名文件
:truck:
:page_facing_up: :page_facing_up: Adding or updating license. 添加或者更新许可
:page_facing_up:
:boom: :boom: Introducing breaking changes. 不兼容变更
:boom:
:bento: :bento: Adding or updating assets. 新增或更新 assets 资源
:bento:
:ok_hand: :ok_hand: Updating code due to code review changes. 更新由 CR 引起的代码变更
:ok_hand:
:wheelchair: :wheelchair: Improving accessibility. 提升无障碍体验
:wheelchair:
:bulb: :bulb: Documenting source code. 书写源码文档
:bulb:
:beers: :beers: Writing code drunkenly.
:beers:
:speech_balloon: :speech_balloon: Updating text and literals. 更新文案以及字面量
:speech_balloon:
:card_file_box: :card_file_box: Performing database related changes. 执行数据库相关变更
:card_file_box:
:loud_sound: :loud_sound: Adding logs. 增加日志
:loud_sound:
:mute: :mute: Removing logs. 移除日志
:mute:
:busts_in_silhouette: :busts_in_silhouette: Adding contributor(s). 新增贡献者
:busts_in_silhouette:
:children_crossing: :children_crossing: Improving user experience / usability. 提升用户体验 / 可用性
:children_crossing:
:building_construction: :building_construction: Making architectural changes. 架构变更
:building_construction:
:iphone: :iphone: Working on responsive design. 真在进展响应式设计的相关事由
:iphone:
:clown_face: :clown_face: Mocking things. Mock 相关
:clown_face:
:egg: :egg: Adding an easter egg. 彩蛋
:egg:
:see_no_evil: :see_no_evil: Adding or updating a .gitignore file 新增或者更新 .gitignore 文件
:see_no_evil:
.gitignore
给枯燥的提交增加一丢丢小情趣,nice~ 💯
nice
如上这个 emoji commit message 指引感觉非常好,所以大致翻译了下和大家分享
出发点源于最近在梳理和制定一套标准化且规范化开发细则,其中如何管理 commit 就是其中很重要的一个环节
借鉴了 angular 开发的规范,目前也是比较大规模使用的。
在指引文档中其中有一点涉及
其中就有
use the imperative, present tense
,回过头想其实平时开发中很少有同学能把一些关键信息用简易且关键的英文动词来描述清楚此次 commit 的动机,而这篇指引一方面用了 emoji 这种形象化的方式外,关键多了解释说明,让我们这种英文不好的同学也能快速掌握到要领,同时可以把这些点,适用到 Subject 中。:art:
:art:
Improving structure / format of the code. 改进目录或代码结构 / 格式化代码:zap:
:zap:
Improving performance. 提升性能:fire:
:fire:
Removing code or files. 移除代码或文件:bug:
:bug:
Fixing a bug. 修复 bug:ambulance:
:ambulance:
Critical hotfix. 紧急修复:sparkles:
:sparkles:
Introducing new features. 新 feature:memo:
:memo:
Writing docs. 书写文档:rocket:
:rocket:
Deploying stuff. 部署相关:lipstick:
:lipstick:
Updating the UI and style files. 更新 UI 和 样式文件:tada:
:tada:
Initial commit. 首次提交:white_check_mark:
:white_check_mark:
Adding tests. 新增测试用例:lock:
:lock:
Fixing security issues. 修复安全性问题:apple:
:apple:
Fixing something on macOS. 修复 macOS 平台上的缺陷:penguin:
:penguin:
Fixing something on Linux. 修复 Linux 平台上的缺陷:checkered_flag:
:checkered_flag:
Fixing something on Windows. 修复 Windows 平台上的缺陷:robot:
:robot:
Fixing something on Android. 修复 Android 上的缺陷:green_apple:
:green_apple:
Fixing something on iOS. 修复 iOS 上的缺陷:bookmark:
:bookmark:
Releasing / Version tags. 发布 / 给代码打版本化的 tag:rotating_light:
:rotating_light:
Removing linter warnings. 移除 linter 的警告:construction:
:construction:
Work in progress. 开发进行时:green_heart:
:green_heart:
Fixing CI Build. 修复 CI 问题:arrow_down:
:arrow_down:
Downgrading dependencies. 降级依赖版本:arrow_up:
:arrow_up:
Upgrading dependencies. 升级依赖版本:pushpin:
:pushpin:
Pinning dependencies to specific versions. 锁死依赖版本:construction_worker:
:construction_worker:
Adding CI build system. 添加 CI:chart_with_upwards_trend:
:chart_with_upwards_trend:
Adding analytics or tracking code. 添加分析或埋点代码:recycle:
:recycle:
Refactoring code. 代码重构:heavy_minus_sign:
:heavy_minus_sign:
Removing a dependency. 移除依赖:whale:
:whale:
Work about Docker. Docker 相关事由:heavy_plus_sign:
:heavy_plus_sign:
Adding a dependency. 添加一个依赖:wrench:
:wrench:
Changing configuration files. 修改一个配置文件:globe_with_meridians:
:globe_with_meridians:
Internationalization and localization. 国际化和本地化:pencil2:
:pencil2:
Fixing typos. 修正拼写错误:hankey:
:hankey:
Writing bad code that needs to be improved. 需要改进的代码,先上后续再重构:rewind:
:rewind:
Reverting changes. 回滚变更:twisted_rightwards_arrows:
:twisted_rightwards_arrows:
Merging branches. 分支合并:package:
:package:
Updating compiled files or packages. 更新打包后的文件或者包:alien:
:alien:
Updating code due to external API changes. 外部依赖 API 变更导致的代码变更:truck:
:truck:
Moving or renaming files. 移动或重命名文件:page_facing_up:
:page_facing_up:
Adding or updating license. 添加或者更新许可:boom:
:boom:
Introducing breaking changes. 不兼容变更:bento:
:bento:
Adding or updating assets. 新增或更新 assets 资源:ok_hand:
:ok_hand:
Updating code due to code review changes. 更新由 CR 引起的代码变更:wheelchair:
:wheelchair:
Improving accessibility. 提升无障碍体验:bulb:
:bulb:
Documenting source code. 书写源码文档:beers:
:beers:
Writing code drunkenly.:speech_balloon:
:speech_balloon:
Updating text and literals. 更新文案以及字面量:card_file_box:
:card_file_box:
Performing database related changes. 执行数据库相关变更:loud_sound:
:loud_sound:
Adding logs. 增加日志:mute:
:mute:
Removing logs. 移除日志:busts_in_silhouette:
:busts_in_silhouette:
Adding contributor(s). 新增贡献者:children_crossing:
:children_crossing:
Improving user experience / usability. 提升用户体验 / 可用性:building_construction:
:building_construction:
Making architectural changes. 架构变更:iphone:
:iphone:
Working on responsive design. 真在进展响应式设计的相关事由:clown_face:
:clown_face:
Mocking things. Mock 相关:egg:
:egg:
Adding an easter egg. 彩蛋:see_no_evil:
:see_no_evil:
Adding or updating a .gitignore file 新增或者更新.gitignore
文件