Skip to content

Commit 32b17d6

Browse files
committed
docs(config): describes the priority of the configuration files
1 parent 63e6388 commit 32b17d6

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,15 @@ $ make && ./_output/$(GOOS)/$(GOARCH)/bin/commitizen init
9898

9999
## Configuration
100100

101-
You can set configuration file that `.czrc` at repository root, home directory, or the $XDG_CONFIG_HOME/commitizen directory. The configuration file that located in repository root have a priority over the one in home directory. The format is the same as the following:
101+
You can set configuration file that `.czrc` at repository root, home directory, or the `$XDG_CONFIG_HOME/commitizen` directory.
102+
103+
commitizen uses the following precedence order. Each item takes precedence over the item below it:
104+
105+
- per-project config file (`/path/to/my/project/.czrc`)
106+
- per-user config file (`~/.czrc`)
107+
- `$XDG_CONFIG_HOME` config file (`$XDG_CONFIG_HOME/commitizen/.czrc`)
108+
109+
The format is the same as the following:
102110

103111
```yaml
104112
name: default
@@ -394,4 +402,4 @@ items:
394402
format: "{{.type}}{{with .scope}}({{.}}){{end}}: {{.subject}}{{with .body}}\n\n{{.}}{{end}}{{with .footer}}\n\n{{.}}{{end}}"`
395403
```
396404

397-
![multiple-templates](https://github.com/shipengqi/illustrations/blob/e0d588dd70551344f0394cbf6671b15ae22e7635/commitizen/multiple-templates.png?raw=true)
405+
![multiple-templates](https://github.com/shipengqi/illustrations/blob/e0d588dd70551344f0394cbf6671b15ae22e7635/commitizen/multiple-templates.png?raw=true)

0 commit comments

Comments
 (0)