commitizen / commitizen/cz-cli

Interactive --retry (prefill with previous attempt information)

Open
#485 8 comments 14 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
17.5k
Forks
566
Avg merge
8h 16m
Merged PRs (30d)
1

Description

I have some git pre-commit hooks in my projects. If they fail after `git cz` is run, then I can either run `git cz` again, and fill everything again, or I can run it with `git cz --retry`, but in that case if the issue was with my commit message not being valid (against [commintlint](http://marionebl.github.io/commitlint/#/guides-use-prompt) for instance) it will just fail again.

It would be nice to have `git cz` be pre-filled with text from last try. So I could just come back and edit it then it would pass the second time.

I can imagine someone not knowing about `.git/COMMIT_EDITMSG` writting a nice commit message with a long description (describing a complex breaking change for example), and feeling devastated when they forgot something that breaks commintlint, and they think they lost their work. This doesn't happen with `git commit -m ""` because most people use their terminal history to recover the previous git commit command with their message.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.