commitizen / commitizen/cz-cli

git commit -m to pre-fill commit title

Ouverte
#847 9 commentaires 9 réactions 1 personne assignée Réclamée par @dmwelch Voir sur GitHub
Langage dominant
JavaScript
Étoiles
17.5k
Forks
566
Merge moyen
8 h 16 min
PR mergées (30 j)
1

Description

With [husky][1] setup, the `-m` is lost.

I'm a CLI guru, so if I typed `-m` already, it should be used as a base, for example, add the category to it unless missing.

```
$ git commit -m 'Add prepare commit msg hook'
$ git commit -m 'feat: Add prepare commit msg hook'
```

currently have to re-type everything with several prompts. kind of slows down the commit process, driving away from the git hook setup.

Husky part:
```diff
--- a/package.json
+++ b/package.json
@@ -105,6 +105,7 @@
},
"husky": {
"hooks": {
+ "prepare-commit-msg": "exec < /dev/tty && git cz --hook || true",
"pre-commit": "lint-staged"
}
},
```

[1]: https://github.com/commitizen/cz-cli#husky

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.