Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit b3d2bbf

Browse files
author
SCrocky
committed
docs(docs/commit.md): Added documentation for -- syntax to separate commitizen args from git commit cli args
1 parent c8f058a commit b3d2bbf

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

‎docs/commit.md‎

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,26 @@
44

55
In your terminal run `cz commit` or the shortcut `cz c` to generate a guided git commit.
66

7-
A commit can be signed off using `cz commit --signoff` or the shortcut `cz commit -s`.
8-
97
You can run `cz commit --write-message-to-file COMMIT_MSG_FILE` to additionally save the
108
generated message to a file. This can be combined with the `--dry-run` flag to only
119
write the message to a file and not modify files and create a commit. A possible use
1210
case for this is to [automatically prepare a commit message](./tutorials/auto_prepare_commit_message.md).
1311

12+
1413
!!! note
1514
To maintain platform compatibility, the `commit` command disable ANSI escaping in its output.
1615
In particular pre-commit hooks coloring will be deactivated as discussed in [commitizen-tools/commitizen#417](https://github.com/commitizen-tools/commitizen/issues/417).
16+
17+
18+
### git options
19+
20+
`git` command options that are not implemented by commitizen can be use via the `--` syntax for the `commit` command.
21+
The syntax separates commitizen arguments from `git commit` arguments by a double dash. This is the resulting syntax:
22+
```
23+
cz commit -commitizen-args -- -git-cli-args
24+
```
25+
For example, using the `-S` option on `git commit` to sign a commit is now commitizen compatible: `cz c -- -S`
26+
27+
!!! note
28+
Deprecation warning: A commit can be signed off using `cz commit --signoff` or the shortcut `cz commit -s`.
29+
This syntax is now deprecated in favor of the new `cz commit -- -s` syntax.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /