Skip to content
liujians的git提交规范与配置
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
cmds
scripts
src
.commitlintrc.js
.editorconfig
.eslintignore
.eslintrc.js
.gitignore
.prettierignore
.prettierrc
.stylelintrc
README.md
commit.config.js
index.js
package-lock.json
package.json
yarn.lock

README.md

git-normalize

liujians的git提交规范说明

使用husky + lint-staged + commitlint来做提交前检查

commit.config.js中有两套emoji,分别用于github和gitlab,默认gitlab,可以自行修改

需要手动在.gitignore中忽略.commitMessage文件

.commitMessage中用于保存上次commit的message信息,防止报错的时候还要重新填写,会在填写时自动读取,不需要复制

cli工具使用步骤:

yarn global add git-normalize

cd /your/project

git-normalize init

  1. 初始化目录,如果缺少某些lint规则文件则copy过去
  2. 安装husky等相关库到当前项目目录
  3. 把命令信息配置到package.json中去

安装完毕使用规则:

git add .

yarn commit

git push

具体文档:

https://www.yuque.com/liujians/doc/nq0s4l#064a7cb3

You can’t perform that action at this time.