git 代码提交注释模板

git 代码提交注释模板

idea使用插件 git-commit-template

  • https://plugins.jetbrains.com/plugin/9861-git-commit-template
    git 代码提交注释模板_第1张图片
    git 代码提交注释模板_第2张图片

git bash下使用模板

新建模板文件

  • common-commit_template
type of change:

scope of this change:

short description:

long description:

breaking changes:

closed issues:

  • 设置模板

    git config --global commit.template common-commit_template

  • 设置文本编辑器

    git config --global croe.editor vim

git 代码提交注释模板_第3张图片

  • 提交代码

    git add 文件名

    git commit -a

  • 编辑提交信息

git 代码提交注释模板_第4张图片

  • git push 即可
  • 效果
    git 代码提交注释模板_第5张图片

你可能感兴趣的:(git)