commitizen / commitizen/cz-cli

git commit -m to pre-fill commit title

オープン
#847 コメント 9 件 リアクション 9 件 担当者 1 名 @dmwelch が担当を希望しています GitHub で見る
主要言語
JavaScript
スター
17.5k
フォーク
566
平均マージ
8時間 16分
マージ済み PR(30日)
1

説明

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

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。