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

Re: git diff --name-status for deleted files

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 15, 2017, 05:47 UTC
Message-ID
<xmqqd16sy0ky.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<PS1PR0601MB188364D92388A08D1D62E7078A6C0@PS1PR0601MB1883.apcprd06.prod.outlook.com>
Gene Thomas <gene@nlc.co.nz> writes:
> Junio,
>            Thanks for your reply. So git is essentially doing a
>            "git commit" when I "git rm".

No. You'd probably need to read a bit more on Git; unlike other systems like CVS and SVN, where you only have two states (i.e. committed contents vs files on the filesystem), we have three states (i.e. the index in addition to the above two).

"git add file" and "git rm file" make the index match what's on the filesystem wrt "file". They never touch committed contents, which "git commit" command is about.

Previous: Gene Thomas
Message 4 of 4 in “git diff --name-status for deleted files”
  1. Gene ThomasSep 14, 2017
  2. Junio C HamanoSep 15, 2017
  3. Gene ThomasSep 15, 2017
  4. Junio C HamanoSep 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.