Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cimhealth/git-toolkit
Git工具集
https://github.com/cimhealth/git-toolkit
cimhealth config git hooks shell toolkits
Last synced: about 2 months ago
JSON representation
Git工具集
- Host: GitHub
- URL: https://github.com/cimhealth/git-toolkit
- Owner: cimhealth
- Created: 2016-09-20T11:21:39.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-04-02T07:54:07.000Z (almost 5 years ago)
- Last Synced: 2024-08-04T04:09:22.072Z (5 months ago)
- Topics: cimhealth, config, git, hooks, shell, toolkits
- Language: Shell
- Homepage: https://cimhealth.github.io/git-toolkit
- Size: 155 KB
- Stars: 37
- Watchers: 2
- Forks: 24
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# Git Toolkit
> 人类懒惰的本性和不满足的本性是驱使科技发展的源泉......
## 安装
**使用curl**
```bash
bash -c "$(curl -fsSL https://raw.githubusercontent.com/tonydeng/git-toolkit/master/installer.sh)"
```**使用wget**
```bash
bash -c "$(wget https://raw.githubusercontent.com/tonydeng/git-toolkit/master/installer.sh -O -)"
```## git toolkit介绍
本工具集包含几个部分,自定义命令,Hook脚本,以及配置模板
### 自定义命令
#### git toolkit
提供本工具集的管理命令。
**查看帮助**
```bash
git toolkit help
```**卸载本工具集**
```bash
git toolkit uninstall
```**更新本工具集**
```bash
git toolkit update
```#### git ci
提供交互式`git commit`的命令,用于定制统一`commit message`。
> 用于替换[Commitizen](https://github.com/commitizen/cz-cli)
```bash
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`语法([查看样例](CHANGELOG.md)):
```
# 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](changelog.jpg)
### Hook脚本
#### commit-msg
用于验证每次提交的`commit message`是否符合规范,如果不符合规范,则提交不成功
### 配置
#### git config --global commit.template
配置统一的`commit message`模板
#### git config --global core.hooksPath
配置制定的Hook脚本的目录,使用本项目的git hook脚本