Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 644708d

Browse files
SCrockyLee-W
SCrocky
authored andcommitted
docs(docs/commit.md): Added documentation for -- syntax to separate commitizen args from git commit cli args
1 parent e702f79 commit 644708d

File tree

1 file changed

+13
-15
lines changed

1 file changed

+13
-15
lines changed

docs/commit.md

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +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

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`
2112

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).
2316

24-
Defaults to: `false`.
2517

26-
In your `pyproject.toml` or `.cz.toml`:
18+
### git options
2719

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
3124
```
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)