30 lines
622 B
Markdown
30 lines
622 B
Markdown
# git-hooks
|
|
|
|
## Installation
|
|
|
|
1. Clone repository
|
|
|
|
```
|
|
git clone https://gitea.ekirin.com/Intis/git-hooks.git
|
|
```
|
|
|
|
### Use in single repository
|
|
|
|
1. Copy `intis-hooks` directory content to `your-repo-dir/.git/hooks` directory.
|
|
|
|
2. Make sure `prepare-commit-msg` is executable. If not, make it: `chmod +x prepare-commit-msg`.
|
|
|
|
### Use globally, as default hooks
|
|
|
|
1. Create `~/.git-templates`
|
|
|
|
2. Run the command:
|
|
|
|
```
|
|
git config --global init.templateDir '~/.git-templates'
|
|
```
|
|
|
|
3. Reinitialize existing git repos you wish to use this in: "git init"
|
|
|
|
4. Rename `your-repo-dir/.git/intis-hooks` to `your-repo-dir/.git/hooks`
|