Git工具集

华盟原创文章投稿奖励计划

自动草稿

Git Toolkit
人类懒惰的本性和不满足的本性是驱使科技发展的源泉......
安装
使用curl
bash -c "$(curl -fsSL https://raw.githubusercontent.co ... master/installer.sh)"
使用wget
bash -c "$(wget 
https://raw.githubusercontent.co ... master/installer.sh -O -)"
git toolkit介绍
本工具集包含几个部分,自定义命令,Hook脚本,以及配置模板
自定义命令
git toolkit
提供本工具集的管理命令。
查看帮助
git toolkit help
卸载本工具集
git toolkit uninstall
更新本工具集
git toolkit update
git ci
提供交互式git commit的命令,用于定制统一commit message。
用于替换Commitizen
git ci
选择您正在提交的类型:
        1. feat: 新功能( Introducing new features )
        2. fix: 修补bug ( Fixing a bug )
        3. docs: 文档( Writing docs )
        4. style: 格式( Improving structure / format of the code )
        5. refactor: 重构( Refactoring code )
        6. test: 增加测试 ( Adding tests )
        7. chore: 构建过程或辅助工具的变动 ( Changing configuration files. )
        8. perf:  改善性能 ( Improving performance )
        0. quit: 退出 ( Exit )
git clog
提供项目的CHANGELOG输出,支持输出到终端或指定文件中,可以使用git clog -h来查看帮助信息。
输出的格式大致如下,符合Markdown语法:
# tag
#### [author](mailto:email) (commit_count)
* commit message (commit date) [commit_short_sha1](commit_url)
* commit message (commit date) [commit_short_sha1](commit_url)
显示效果如下:
git-toolkit changelog
Hook脚本
commit-msg
用于验证每次提交的commit message是否符合规范,如果不符合规范,则提交不成功
配置
git config --global commit.template
配置统一的commit message模板
git config --global core.hooksPath
配置制定的Hook脚本的目录,使用本项目的git hook脚本
【文章来源】:

https://github.com/cimhealth/git-toolkit

本文原创,作者:congtou,其版权均为华盟网所有。如需转载,请注明出处:https://www.77169.net/html/255127.html

发表评论