1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-27 16:20:07 +00:00
ohmyzsh/plugins/git-commit-template/README.md

40 lines
1.2 KiB
Markdown
Raw Normal View History

2022-01-23 06:53:54 +00:00
# git-commit-template plugin
2022-01-07 09:43:58 +00:00
2022-01-23 06:53:54 +00:00
To better write git commit messages, we can use template to specify the desired description and type of message.
2022-01-07 09:43:58 +00:00
2022-01-23 06:53:54 +00:00
To use it, add `git-commit-template` to the plugins array in your zshrc file:
2022-01-23 06:43:57 +00:00
```bash
2022-01-23 06:53:54 +00:00
plugins=(... git-commit-template)
2022-01-23 06:43:57 +00:00
```
2022-01-23 06:53:54 +00:00
## Learn This Articles
2022-01-23 06:43:57 +00:00
2022-01-23 06:53:54 +00:00
- #### [How to Write Better Git Commit Messages](https://www.freecodecamp.org/news/how-to-write-better-git-commit-messages/)
2022-01-23 06:43:57 +00:00
2022-01-23 06:53:54 +00:00
- #### [Epower Git Template](https://github.com/epowerng/git-template)
2022-01-23 06:43:57 +00:00
2022-01-07 09:43:58 +00:00
## Usage
2022-01-07 10:42:50 +00:00
All you have to do is call the `gct` command and fill in the items that
are not optional at each step to prepare the message format.
2022-01-07 09:43:58 +00:00
2022-01-23 06:53:54 +00:00
![gct](https://raw.githubusercontent.com/ghasemdev/git-commit-template/master/images/1.png)
2022-01-07 09:43:58 +00:00
2022-01-23 06:53:54 +00:00
![result](https://raw.githubusercontent.com/ghasemdev/git-commit-template/master/images/2.png)
2022-01-07 09:43:58 +00:00
With the `git log` command, we can see the message that we committed.
2022-01-23 06:53:54 +00:00
![git log](https://raw.githubusercontent.com/ghasemdev/git-commit-template/master/images/3.png)
2022-01-23 06:43:57 +00:00
### signature
You can use `-s` or `sign` to add a signature to the gct.
```bash
➜ gct -s
➜ gct sign
```
2022-01-07 09:43:58 +00:00
2022-01-23 06:53:54 +00:00
## Tanks For Supporting 📌 [Source](https://github.com/ghasemdev/git-commit-template)