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

git-diff new files (without using index)

From
Miles Bader <miles@gnu.org>
Date
Aug 5, 2007, 03:42 UTC
Message-ID
<87wswalkad.fsf@catnip.gol.com>

One thing I often want to do is generate a complete diff of all changes, including new/removed files.

If I add things to the index, I can use "git-diff --cached" to do it; however I'd actually like to be able to do this _without_ updating the index; in other words, any un-added new file as a change. As it is, the "non-indexed" state seems kind of a second-class citizen, as you can never have new files there (or rather, git will never really see them).

Is there anyway to do this currently? If not, maybe something like a "git-diff -N" (mirroring diff's -N/--new-file option) option could be added to do this?

Thanks,
-Miles
-- 
=====
(^o^;
(()))
*This is the cute octopus virus, please copy it into your sig so it can spread.
Next: Shawn O. Pearce
Message 1 of 6 in “git-diff new files (without using index)”
  1. Miles BaderAug 5, 2007
  2. Shawn O. PearceAug 5, 2007
  3. Miles BaderAug 5, 2007
  4. Shawn O. PearceAug 5, 2007
  5. Junio C HamanoAug 5, 2007
  6. Miles BaderAug 5, 2007

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.