[FEATURE] git-commit option to prepend filename to commit message
- Date: Sat, 15 Jul 2017 10:19:34 -0400 (GMT-04:00)
- From: John J Foerch <jjfoerch@xxxxxxxxxxxxx>
- Subject: [FEATURE] git-commit option to prepend filename to commit message
I had an idea for a feature for git commit that I wanted to pass along and see if maybe others would also think this would be useful.
Very often, I make commits that affect a single file, and have simple commit messages of this form:
<filename>: <what changed>
The feature would be a command line option for git commit that would automatically prepend the "<filename>: " to the commit message. The different cases of its behavior could be:
- commit affecting a single file, with commit message given by -m:
: prepend "<filename>: " to the message given by -m
- commit affecting a single file, with commit message from editor:
: pre-fill commit message template with "<filename>: "
- commit affecting multiple files:
: use common base directory of all affected files for <filename>, behaviors as above for use with -m or editor.
Anybody think that this or something like it would be a good convenience?