You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/commit.md
+13-15Lines changed: 13 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -4,28 +4,26 @@
4
4
5
5
In your terminal run `cz commit` or the shortcut `cz c` to generate a guided git commit.
6
6
7
-
A commit can be signed off using `cz commit --signoff` or the shortcut `cz commit -s`.
8
-
9
7
You can run `cz commit --write-message-to-file COMMIT_MSG_FILE` to additionally save the
10
8
generated message to a file. This can be combined with the `--dry-run` flag to only
11
9
write the message to a file and not modify files and create a commit. A possible use
12
10
case for this is to [automatically prepare a commit message](./tutorials/auto_prepare_commit_message.md).
13
11
14
-
!!! note
15
-
To maintain platform compatibility, the `commit` command disables ANSI escaping in its output.
16
-
In particular, pre-commit hooks coloring will be deactivated as discussed in [commitizen-tools/commitizen#417](https://github.com/commitizen-tools/commitizen/issues/417).
17
-
18
-
## Configuration
19
-
20
-
### `always_signoff`
21
12
22
-
When set to `true`, each commit message created by `cz commit` will be signed off.
13
+
!!! note
14
+
To maintain platform compatibility, the `commit` command disable ANSI escaping in its output.
15
+
In particular pre-commit hooks coloring will be deactivated as discussed in [commitizen-tools/commitizen#417](https://github.com/commitizen-tools/commitizen/issues/417).
23
16
24
-
Defaults to: `false`.
25
17
26
-
In your `pyproject.toml` or `.cz.toml`:
18
+
### git options
27
19
28
-
```toml
29
-
[tool.commitizen]
30
-
always_signoff = true
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
31
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