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
{{ message }}
Repository navigation
Commit c00f5dc
Browse filesBrowse the repository at this point in the historyBrowse files
feat(config): add the commit_encoding setting for commit message files
`commit_encoding` sets the encoding of the files that hold a commit
message: the `cz commit --edit` file, the `--write-message-to-file`
file, the `--retry` backup file and the `cz check --commit-msg-file`
file. The default is `None`, which means `encoding`. The last three
files already use `encoding`, so they do not change by default.
Assisted By: AI
Copy file name to clipboardExpand all lines: docs/config/commit.md
+14Lines changed: 14 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,20 @@ When true, breaking changes will be also indicated by an exclamation mark in the
11
11
12
12
When false, breaking changes will be only indicated by `BREAKING CHANGE:` in the footer. See [writing commits](../tutorials/writing_commits.md) for more details.
13
13
14
+
## `commit_encoding`
15
+
16
+
- Type: `str`
17
+
- Default: `None`
18
+
19
+
Sets the character encoding of the files that hold a commit message:
20
+
21
+
- the file that `cz commit --edit` opens in the editor
22
+
- the file that `cz commit --write-message-to-file` writes
23
+
- the backup file that `cz commit --retry` reads
24
+
- the file that `cz check --commit-msg-file` reads
25
+
26
+
If it is not set, Commitizen uses [`encoding`](#encoding). Set it when your editor saves commit messages in a different encoding from your other files.
By default, Commitizen uses `utf-8` encoding. You can configure a different encoding through the `encoding` [configuration option][configuration].
149
149
150
+
Files that hold a commit message, such as the file that `cz commit --edit` opens in your editor, use the [`commit_encoding`][commit-encoding] option. If it is not set, they use `encoding`.
0 commit comments