git commit -m to pre-fill commit title
See original GitHub issueWith husky 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:
--- 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"
}
},
Issue Analytics
- State:
- Created 2 years ago
- Reactions:9
- Comments:8 (1 by maintainers)
Top Results From Across the Web
git commit: pre-populate commit subject but still prompt for a ...
What I'm looking for is a way to have the commit subject pre-populated while still being able to write the commit message manually....
Read more >git-commit Documentation - Git
NAME. git-commit - Record changes to the repository ... The commit message subject line is taken from the specified commit with a prefix...
Read more >Git Commit | Atlassian Git Tutorial
A power user shortcut command that combines the -a and -m options. This combination immediately creates a commit of all the staged changes...
Read more >VS Code Extension Git Prefix - Prefill Your Commit Message ...
... extension for VS Code called Git Prefix by Samuel Meyers that let's you prefill your git commit messages with your branch name....
Read more >MR Title and Description should be pre-filled from first ... - GitLab
The merge request's title if no multi-line commit message is found. ... gp gitlab @:refs/heads/commit-message-template --force Total 0 ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi,
Just to add to this thread: This shortcoming is this only thing preventing me from recommending cz.
@nevstokes: quote
"$file"
to avoid word splitting