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

Re: Add warning when there are changes in the index and using -a with git commit

From
Sylvain Rabot <sylvain@abstraction.fr>
Date
Apr 21, 2010, 22:38 UTC
Message-ID
<w2r7fce93be1004211538pe406dfebs79e1f4673e521988@mail.gmail.com>
In-Reply-To
<0CCBCCA0-8378-42A8-A925-F60AA09949DC@wincent.com>
On Wed, Apr 21, 2010 at 23:38, Wincent Colaiuta <win@wincent.com> wrote:
> Without even really meaning to, I ended up training myself to only commit what's staged in the index, because early on I acquired the habit of always reviewing every single changed hunk by using "git add --patch" (in fact I use it so often that I've created an alias of "git patch" for it). There's no telling how many times this kind of last-minute hunk-by-hunk reviewing has saved me from committing bad code.

Well, the thing is I do that to but instinctively, 3 seconds after, I do my git commit -as -m "blah", making useless the time I spend staging hunks with git add -p

-- 
Sylvain
Previous: Wincent Colaiuta
Message 5 of 5 in “Add warning when there are changes in the index and using -a with git commit”
  1. Sylvain RabotApr 21, 2010
  2. Sverre RabbelierApr 21, 2010
  3. Eli BarzilayApr 21, 2010
  4. Wincent ColaiutaApr 21, 2010
  5. Sylvain RabotApr 21, 2010

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.