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

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, 20:20 UTC
Message-ID
<v2m7fce93be1004211320r9adc0b14j11bd06c3b045e639@mail.gmail.com>
Hi,

Many times I had the bad reflex of doing a git commit -as -m "blah blah" when I was willing to commit only things I had staged in the index.

It could be useful to add a warning and a prompt when using the -a option with changes staged in the index to avoid errors.

Regards.
-- 
Sylvain
Next: Sverre Rabbelier
Message 1 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.