如何使团队的 git log 更优雅

前言
每当我接收一份新的代码,代码拿到手要做的第一件事就是 git log,看看这份代码的提交记录,最近提交的情况,做了些什么。但往往看到的 git log 杂乱无章,不知道每次提交到底是做了些什么。由此可见,在团队中,CHANGELOG 的重要性不言而喻,不仅有助于他人帮忙 review 代码,熟悉代码,也能高效的输出 CHANGELOG,对项目管理也至关重要。
本文介绍使用几种开源工具来实现对提交日志的规范化,使用的几种工具介绍如下:
cz-cli
github 地址:https://github.com/commitizen/cz-cli
husky
github 地址:https://github.com/typicode/husky
cz-conventional-changelog
github 地址:https://github.com/commitizen/cz-conventional-changelog
standard-version
github 地址:https://github.com/conventional-changelog/standard-version
安装教程
cz-cli 安装
在安装之前,我们需要在本地安装 npm,可以参考教程:https://juejin.cn/post/6844903586313273358
版权声明: 本文为 InfoQ 作者【阿呆】的原创文章。
原文链接:【http://xie.infoq.cn/article/906127646e4f0283c3a399003】。文章转载请联系作者。
评论