|
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 |
|
| 12 | + |
14 | 13 | !!! note
|
15 | 14 | To maintain platform compatibility, the `commit` command disable ANSI escaping in its output.
|
16 | 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).
|
| 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