From ca329c28df3817d53ef6b41edb72822e230de3eb Mon Sep 17 00:00:00 2001 From: BelpHegoR17 Date: Mon, 5 Jan 2026 20:15:23 +0530 Subject: [PATCH 1/3] docs(config/configuration_file.md): document the --config CLI option --- docs/config/configuration_file.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/config/configuration_file.md b/docs/config/configuration_file.md index 846910255..865326c79 100644 --- a/docs/config/configuration_file.md +++ b/docs/config/configuration_file.md @@ -20,6 +20,14 @@ Configuration files are typically located in the root of your project directory. The first valid configuration file found will be used. If no configuration file is found, Commitizen will use its default settings. +!!! note + Commitizen supports explicitly specifying a configuration file using the `--config` option, which is useful when the configuration file is not located in the project root directory. + When `--config` is provided, Commitizen will only load configuration from the specified file and will not search for configuration files using the default search order described above. If the specified configuration file does not exist, Commitizen will raise an error. + + ```bash + cz --config + ``` + !!! tip For Python projects, it's recommended to add your Commitizen configuration to `pyproject.toml` to keep all project configuration in one place. From f4966aff57eff9436e1bb759cc5cbaab2b91410f Mon Sep 17 00:00:00 2001 From: BelpHegoR17 Date: Tue, 6 Jan 2026 17:11:07 +0530 Subject: [PATCH 2/3] docs(config/configuration_file.md): specify the error --- docs/config/configuration_file.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/config/configuration_file.md b/docs/config/configuration_file.md index 865326c79..596967ee3 100644 --- a/docs/config/configuration_file.md +++ b/docs/config/configuration_file.md @@ -21,8 +21,8 @@ Configuration files are typically located in the root of your project directory. The first valid configuration file found will be used. If no configuration file is found, Commitizen will use its default settings. !!! note - Commitizen supports explicitly specifying a configuration file using the `--config` option, which is useful when the configuration file is not located in the project root directory. - When `--config` is provided, Commitizen will only load configuration from the specified file and will not search for configuration files using the default search order described above. If the specified configuration file does not exist, Commitizen will raise an error. + Commitizen supports explicitly specifying a configuration file using the `--config` option, which is useful when the configuration file is not located in the project root directory. + When `--config` is provided, Commitizen will only load configuration from the specified file and will not search for configuration files using the default search order described above. If the specified configuration file does not exist, Commitizen raises the `ConfigFileNotFound` error.If the specified configuration file exists but is empty, Commitizen raises the `ConfigFileIsEmpty` error. ```bash cz --config From 8f4dde5c50819094aa4139b83d23117f424e0de6 Mon Sep 17 00:00:00 2001 From: BelpHegoR17 Date: Tue, 6 Jan 2026 19:28:11 +0530 Subject: [PATCH 3/3] docs(config/configuration_file.md): fix indent --- docs/config/configuration_file.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/config/configuration_file.md b/docs/config/configuration_file.md index 596967ee3..71944cb71 100644 --- a/docs/config/configuration_file.md +++ b/docs/config/configuration_file.md @@ -22,7 +22,7 @@ The first valid configuration file found will be used. If no configuration file !!! note Commitizen supports explicitly specifying a configuration file using the `--config` option, which is useful when the configuration file is not located in the project root directory. - When `--config` is provided, Commitizen will only load configuration from the specified file and will not search for configuration files using the default search order described above. If the specified configuration file does not exist, Commitizen raises the `ConfigFileNotFound` error.If the specified configuration file exists but is empty, Commitizen raises the `ConfigFileIsEmpty` error. + When `--config` is provided, Commitizen will only load configuration from the specified file and will not search for configuration files using the default search order described above. If the specified configuration file does not exist, Commitizen raises the `ConfigFileNotFound` error. If the specified configuration file exists but is empty, Commitizen raises the `ConfigFileIsEmpty` error. ```bash cz --config