summaryrefslogtreecommitdiff
path: root/plugins/git-commit/README.md
diff options
context:
space:
mode:
authorMarc Cornellà <marc@mcornella.com>2023-10-25 19:47:10 +0200
committerMarc Cornellà <marc@mcornella.com>2023-10-25 19:47:46 +0200
commit048455ccefdc67c4f137b8f7886769c55c2e5417 (patch)
tree4ebc3c4bf925a91002b88558a9aa15f1fdb36c49 /plugins/git-commit/README.md
parent5c22c5812ec8b980d223b8252edc7759dd354014 (diff)
downloadzsh-048455ccefdc67c4f137b8f7886769c55c2e5417.tar.gz
zsh-048455ccefdc67c4f137b8f7886769c55c2e5417.tar.bz2
zsh-048455ccefdc67c4f137b8f7886769c55c2e5417.zip
fix(git-commit): fix revert alias conflict (#12007)
Fixes #12007
Diffstat (limited to 'plugins/git-commit/README.md')
-rw-r--r--plugins/git-commit/README.md14
1 files changed, 10 insertions, 4 deletions
diff --git a/plugins/git-commit/README.md b/plugins/git-commit/README.md
index dc10d8ad5..91cc73b44 100644
--- a/plugins/git-commit/README.md
+++ b/plugins/git-commit/README.md
@@ -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"` |