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

2 messages from 2008-10-04 to 2008-10-04. Participants: Mark Burton, Elijah Newren.
Thread: https://gitlist.dev/t/15782

## Mark Burton, 2008-10-04 20:07

Subject: Question: How to list files that haven't been modified?
Message-ID: <loom.20081004T195935-879@post.gmane.org>
URL: https://gitlist.dev/e/loom.20081004T195935-879%40post.gmane.org

```

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.

Thanks,

Mark

```

## Elijah Newren, 2008-10-04 23:01

Subject: Re: Question: How to list files that haven't been modified?
Message-ID: <51419b2c0810041601g5f9e3007p70af60b5db7a066a@mail.gmail.com>
URL: https://gitlist.dev/e/51419b2c0810041601g5f9e3007p70af60b5db7a066a%40mail.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:
>
> 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)

```
