From 97260795b4a896af028c020f4ccb69d4495ced61 Mon Sep 17 00:00:00 2001 From: Wei Lee Date: Tue, 7 Apr 2020 18:17:26 +0800 Subject: [PATCH] docs(FAQ): add revert and chore types discussion --- docs/README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/docs/README.md b/docs/README.md index 1f7166aff..bf689b458 100644 --- a/docs/README.md +++ b/docs/README.md @@ -102,6 +102,23 @@ commands: init init commitizen configuration ``` +## FAQ + +### Why are `revert` and `chore` valid types in the check pattern of cz conventional_commits but not types we can select? + +`revert` and `chore` are added to the "pattern" in `cz check` in order to prevent backward errors, but officially they are not part of conventional commits, we are using the latest [types from Angular](https://github.com/angular/angular/blob/22b96b9/CONTRIBUTING.md#type) (they used to but were removed). Using `chore` or `revert` would be part of a different custom rule. + +However, you can always create a customized `cz` with those extra types (See [Customization](https://commitizen-tools.github.io/commitizen/customization/). + +See more discussion in issue [#142](https://github.com/commitizen-tools/commitizen/issues/142) and [#36](https://github.com/commitizen-tools/commitizen/issues/36) + +### How to handle revert commits? + +```sh +git revert --no-commit +git commit -m "revert: foo bar" +``` + ## Contributing Feel free to create a PR.