This page contains frequently asked how to questions.
PEP621 establishes a [project] definition inside pyproject.toml
Commitizen provides a PEP621 version provider to get and set version from this field.
You just need to set the proper version_provider setting:
If for any reason, the created tag and changelog were to be undone, this is the snippet:
This will remove the last tag created, plus the commit containing the update to .cz.toml and the changelog generated for the version.
In case the commit was pushed to the server, you can remove it by running:
This error was caused by a Python bug on Windows. It's been fixed by cpython #22017, and according to Python's changelog, 3.8.6rc1 and 3.9.0rc2 should be the accurate versions first contain this fix. In conclusion, upgrade your Python version might solve this issue.
More discussion can be found in issue #318.
You can use the legacy_tag_formats to list old tag formats. New bumped tags will be in the new format but old ones will still work for:
So given if you change from myproject-$version to ${version} and then v${version}, your Commitizen configuration will look like this:
You can explicitly ignore them with ignored_tag_formats.