# sparse checkout : ignore paths

2 messages from 2017-01-23 to 2017-01-23. Participants: Tushar Kapila, Johannes Schindelin.
Thread: https://gitlist.dev/t/44951

## Tushar Kapila, 2017-01-23 11:45

Subject: sparse checkout : ignore paths
Message-ID: <CALNyQkyy_prP60kp_DpMzG9+affqPW0-z6F81R4OSgHg0QFc+g@mail.gmail.com>
URL: https://gitlist.dev/e/CALNyQkyy_prP60kp_DpMzG9%2BaffqPW0-z6F81R4OSgHg0QFc%2Bg%40mail.gmail.com

```
When we clone/ pull with : config core.sparsecheckout true

We can specify paths to include. Would be good to explicitly specify
paths to exclude too. So I can include want/
but exclude want/bin/

Similar to .git/info/sparse-checkout can we have a
.git/info/sparse-ignore-checkout optional file?

Logic would be to see if a path matches that is in
.git/info/sparse-checkout then see if its flagged in
.git/info/sparse-ignore-checkout , do not download if blocked in
.git/info/sparse-ignore-checkout. If the file does not exist, then
nothing ignored.

Regards,
Tushar Kapila

```

## Johannes Schindelin, 2017-01-23 15:13

Subject: Re: sparse checkout : ignore paths
Message-ID: <alpine.DEB.2.20.1701231613210.3469@virtualbox>
URL: https://gitlist.dev/e/alpine.DEB.2.20.1701231613210.3469%40virtualbox
In-Reply-To: <CALNyQkyy_prP60kp_DpMzG9+affqPW0-z6F81R4OSgHg0QFc+g@mail.gmail.com>

```
Hi,

On Mon, 23 Jan 2017, Tushar Kapila wrote:

> When we clone/ pull with : config core.sparsecheckout true
> 
> We can specify paths to include. Would be good to explicitly specify
> paths to exclude too.

That is already possible by using "negative patterns", i.e. patterns
preceded by an exclamation point.

Ciao,
Johannes

```
