# git ls-files --ignored and ignored directory

2 messages from 2012-11-06 to 2012-11-06. Participants: Damien Robert.
Thread: https://gitlist.dev/t/32033

## Damien Robert, 2012-11-06 21:19

Subject: git ls-files --ignored and ignored directory
Message-ID: <k7bus9$o9t$1@ger.gmane.org>
URL: https://gitlist.dev/e/k7bus9%24o9t%241%40ger.gmane.org

```
I would like to use git ls-files to show all the ignored files, including
directory.

As an example of setup:

mkdir /tmp/git && cd /tmp/git
git init
mkdir a b
touch a/a
touch b/b
cat >.gitignore << EOF
a/
b/*
EOF

Then if I do:
$ git ls-files --exclude-standard --ignored --others
b/b
$ git ls-files --exclude-standard --ignored --others --directory
a/

In the first case I was expecting
a/a
b/b
and in the second case
a/
b/

Is there a way to get the behavior I'd like? Thanks!

```

## Damien Robert, 2012-11-06 21:24

Subject: Re: git ls-files --ignored and ignored directory
Message-ID: <k7bv6s$ujm$1@ger.gmane.org>
URL: https://gitlist.dev/e/k7bv6s%24ujm%241%40ger.gmane.org
In-Reply-To: <k7bus9$o9t$1@ger.gmane.org>

```
Damien Robert  wrote in message <k7bus9$o9t$1@ger.gmane.org>:
> I would like to use git ls-files to show all the ignored files, including
> directory.
> Is there a way to get the behavior I'd like? Thanks!

I forgot to add that this is with version 1.8.0, I haven't tried with
current master.

$ git --version
git version 1.8.0

```
