Skip to content

Commit bb06015

Browse files
committed
docs: update README.md and add Chinese version README_zh.md
1 parent 4a2cb1e commit bb06015

2 files changed

Lines changed: 57 additions & 1 deletion

File tree

README.md

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,29 @@
1-
# commit-msg.go
1+
# commit-msg
2+
23
A git commit-msg hook by go.
4+
5+
6+
7+
## Install
8+
9+
Just put the executable binary into the hook directory of your project which using git as VCS.
10+
11+
Assuming the project root is `/`, the hook directory should be `/.git/hooks/` . Please make sure the binary is named as `commit-msg` or `commit-msg.exe` (win) , and the executable permission is granted.
12+
13+
If you can't find the hook directory, make sure you have shown the hidden directory.
14+
15+
16+
17+
After installation, git will call it automatically to validate commit message, no manual calls are required.
18+
19+
### From pre-built binary
20+
21+
You can download the latest pre-built binary from [here](https://github.com/JayceChant/commit-msg/releases) . However, only win64 binaries are available.
22+
23+
24+
25+
### Build and install from source code
26+
27+
Please setup the go environment and build it yourself.
28+
29+
Sorry for the poor instructions.

README_zh.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# commit-msg
2+
3+
一个 go 实现的 git commit-msg 钩子。
4+
5+
6+
7+
## 安装
8+
9+
只需将二进制文件放到 git 管理的项目的 hook 目录里。
10+
11+
假设项目的根目录是 `/`, 那么钩子目录应该为 `/.git/hooks/` 。请确认文件名为 `commit-msg``commit-msg.exe` (win) , 并且文件有可执行权限。
12+
13+
如果你找不到 hook 目录,请确认是否有设置隐藏目录可见。
14+
15+
16+
17+
安装之后,git 会自动调用程序完成 commit message 的检查,无需手动调用。
18+
19+
### 从编译好的二进制安装
20+
21+
你可以在 [这里](https://github.com/JayceChant/commit-msg/releases) 下载编译好的二进制文件。 不过,暂时只提供 win64 平台。
22+
23+
24+
25+
### 从源码编译并安装
26+
27+
请自行配置 go 开发环境并编译安装。
28+
29+
因为时间关系,抱歉没有更详细的指引。

0 commit comments

Comments
 (0)