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

Re: Surprising semantics of "git add file"

From
Andreas Schwab <schwab@linux-m68k.org>
Date
May 5, 2019, 20:31 UTC
Message-ID
<87o94gbq46.fsf@igel.home>
In-Reply-To
<5CCF414A020000A10003108C@gwsmtp.uni-regensburg.de>
On Mai 05 2019, "Ulrich Windl" <Ulrich.Windl@rz.uni-regensburg.de> wrote:
> After that a "git diff --cached file" just shows the changes added interactively, but when I "git add file" to commit those changes), even the unstaged changes from file are committed.
Did you really mean "git add" here?  It doesn't commit, it adds to the index.
Andreas.
-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."
Previous: Ulrich WindlNext: Ulrich Windl
Message 3 of 4 in “Surprising semantics of "git add file"”
  1. Ulrich WindlMay 5, 2019
  2. Antw: Surprising semantics of "git add file"Ulrich Windl, May 5, 2019
  3. Andreas SchwabMay 5, 2019
  4. Antw: Re: Surprising semantics of "git add file"Ulrich Windl, May 6, 2019

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.