commitizen / commitizen/cz-cli

git commit -m to pre-fill commit title

Abierto
#847 9 comentarios 9 reacciones 1 asignado Reclamado por @dmwelch Ver en GitHub
Lenguaje dominante
JavaScript
Estrellas
17.5k
Forks
566
Merge medio
8 h 16 min
PR fusionados (30 d)
1

Descripción

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

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.