question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature request: `commitizen` should support revert commits

See original GitHub issue

I know that a similar request was discussed before, however angular does contemplate revert commits.

As a minimum, cz check should accept commit messages beginning with revert:, otherwise when it is configured as a pre-commit hook it does not allow revert commits.

Moreover, IMHO a cz revert command should be added, accepting the <commit> to revert. It should run git revert <commit>, including in the message body: This reverts commit <hash>. as per angular instructions. See information on git revert.

For examples of revert commit messages, see for instance standard-version and conventional-changelog commit logs.

Notice that both commitlint and gitlint support revert commits.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
Lee-Wcommented, Mar 17, 2020

This issue is raised more than one time (I had the same question when I first use commizen as well.) Maybe we could consider adding it to FAQ in documentation?

1reaction
lucatrvcommented, Mar 15, 2020

I now noticed the following definition of the schema_pattern function in conventional_commits.py:

def schema_pattern(self) -> str:
    PATTERN = (
        r"(build|ci|docs|feat|fix|perf|refactor|style|test|chore|revert|bump)"
        r"(\(\S+\))?:\s.*"
    )
    return PATTERN

So it includes both revert and chore.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Commitizen - GitHub Pages
When you commit with Commitizen, you'll be prompted to fill out any required commit fields ... commitizen.path is resolved via require.resolve and supports:....
Read more >
Conventional Commits
The Conventional Commits specification is a lightweight convention on top of commit messages. ... A BREAKING CHANGE can be part of commits of...
Read more >
Being intentional with commits - DEV Community ‍ ‍
If you want to see some truly hilarious commit messages you can check ... Commitizen which is based on Conventional Commits specification.
Read more >
How to Write Better Git Commit Messages – A Step-By-Step ...
Have you ever wondered how you can improve your Git commit messages? ... some implementations to suggest that may help your team's workflow....
Read more >
Commit message templates - GitLab Docs
Users can override these templates when merging a merge request. ... Change the commit templates for your project if the default templates don't...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found