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

git-commit: select which files to commit while editing the commit message

From
PPazu <pazu@pazu.com.br>
Date
Dec 8, 2006, 12:36 UTC
Message-ID
<loom.20061208T131919-178@post.gmane.org>

Junio's reworking of the git-commit documentation, and the ensuing discussion about what is commited, and how do you select that, made me remember how much I liked SVK -- particularly, how much I liked to remove files from the commit message template, and have them removed from the commit.

At first, I thought "great opportunity to contribute my first patch to git", until I realized that git-commit is written in bash, and my brain refuses to understand that. Yep, I'm that bad. So I'm writing this, and maybe someone well-versed in bash will find this a good idea and code it :-)

For those not familiar with SVK, if you remove the files mentioned in the commit template (that "here are the files that you're about to commit" part), SVK won't commit them. For example, if I modify a couple of files in git, and execute 'git commit -a', an editor will popup showing something like this:

# Please enter the commit message for your changes. # (Comment lines starting with '#' will not be included) # On branch refs/heads/next # Updated but not checked in: # (will commit) # # modified: perl/Makefile # modified: var.c

Here's where the magic would happen. Removing the line "modified: var.c" would remove var.c from this commit. Of course, the template message should be modified to tell the user he can do that.

So, what do you think about this?
-- Pazu
Next: Junio C Hamano
Message 1 of 3 in “git-commit: select which files to commit while editing the commit message”
  1. PazuDec 8, 2006
  2. Junio C HamanoDec 8, 2006
  3. SeanDec 9, 2006

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.