git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[FEATURE] git-commit option to prepend filename to commit message

From
John J Foerch <jjfoerch@earthlink.net>
Date
Jul 15, 2017, 14:19 UTC
Message-ID
<18894679.1800.1500128374439@elwamui-karabash.atl.sa.earthlink.net>
Hello,
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?
Thank you,
John Foerch
Next: Johannes Sixt
Message 1 of 3 in “[FEATURE] git-commit option to prepend filename to commit message”
  1. John J FoerchJul 15, 2017
  2. Johannes SixtJul 15, 2017
  3. Jeff KingJul 15, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.