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

Re: Question: How to list files that haven't been modified?

From
Elijah Newren <newren@gmail.com>
Date
Oct 4, 2008, 23:01 UTC
Message-ID
<51419b2c0810041601g5f9e3007p70af60b5db7a066a@mail.gmail.com>
In-Reply-To
<loom.20081004T195935-879@post.gmane.org>
On Sat, Oct 4, 2008 at 2:07 PM, Mark Burton <markb@ordern.com> wrote:
Show 8 quoted lines
>
> Hi,
>
> It's still early days for me and I haven't yet discovered how to ask git to list
> all the files in a tree that don't have pending modifications (staged or not). I
> have read about ls-files but it doesn't seem to offer that option. As far as I
> can tell, it can list the files known to git and the files that have been
> modified but not the difference between those sets.
You could manually construct the difference between the lists:
$ comm -3 <(git ls-files) <(git ls-files --modified)
Previous: Mark Burton
Message 2 of 2 in “Question: How to list files that haven't been modified?”
  1. Mark BurtonOct 4, 2008
  2. Elijah NewrenOct 4, 2008

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.