fix(git-commit): fix revert alias conflict (#12007)

Fixes #12007
This commit is contained in:
Marc Cornellà
2023-10-25 19:47:10 +02:00
parent 5c22c5812e
commit 048455ccef
2 changed files with 24 additions and 14 deletions

View File

@ -10,7 +10,7 @@ plugins=(... git-commit)
## Syntax
```zshrc
```zsh
git <type> [(-s, --scope) "<scope>"] "<message>"
```
@ -26,11 +26,17 @@ Where `type` is one of the following:
- `fix`
- `perf`
- `refactor`
- `revert`
- `rev`
- `style`
- `test`
> NOTE: the alias for `revert` type is `rev`, as otherwise it conflicts with the git command of the same name.
> It will still generate a commit message in the format `revert: <message>`
## Examples
`git style "remove trailing whitespace"` -> `git commit -m "style: remove trailing whitespace"`
`git fix -s "router" "correct redirect link"` -> `git commit -m "fix(router): correct redirect link"`
| Git alias | Command |
| --------------------------------------------- | ---------------------------------------------------- |
| `git style "remove trailing whitespace"` | `git commit -m "style: remove trailing whitespace"` |
| `git fix -s "router" "correct redirect link"` | `git commit -m "fix(router): correct redirect link"` |
| `git rev -s "api" "rollback v2"` | `git commit -m "revert(api): rollback v2"` |