# Way to specify an exclusion refspec?

2 messages from 2010-12-02 to 2010-12-03. Participants: Dun Peal, Sverre Rabbelier.
Thread: https://gitlist.dev/t/25929

## Dun Peal, 2010-12-02 22:17

Subject: Way to specify an exclusion refspec?
Message-ID: <AANLkTi=YPJKvNW3PKcaSTRSPFCARHC=hn2OtSYOoe7DA@mail.gmail.com>
URL: https://gitlist.dev/e/AANLkTi%3DYPJKvNW3PKcaSTRSPFCARHC%3Dhn2OtSYOoe7DA%40mail.gmail.com

```
Hi. The manpage describes how to specify an inclusion refspec, like
for example the default one that gets set for `origin` in
`.git/config`, which tells git to include all (`*`) heads in every
fetch operation:

  +refs/heads/*:refs/remotes/origin/*

But how about specifying an exclusion refspec?  For instance, we want
to fetch all heads (`*`) except `foo`, or all heads beginning in "ba"
(`ba*`) except `bar`.

Thanks, D

```

## Sverre Rabbelier, 2010-12-03 01:20

Subject: Re: Way to specify an exclusion refspec?
Message-ID: <AANLkTimXg0M8H_WrgqMJx=_r+Q=ghp1N9WaQq8NSgWCX@mail.gmail.com>
URL: https://gitlist.dev/e/AANLkTimXg0M8H_WrgqMJx%3D_r%2BQ%3Dghp1N9WaQq8NSgWCX%40mail.gmail.com
In-Reply-To: <AANLkTi=YPJKvNW3PKcaSTRSPFCARHC=hn2OtSYOoe7DA@mail.gmail.com>

```
Heya,

On Thu, Dec 2, 2010 at 23:17, Dun Peal <dunpealer@gmail.com> wrote:
> But how about specifying an exclusion refspec?  For instance, we want
> to fetch all heads (`*`) except `foo`, or all heads beginning in "ba"
> (`ba*`) except `bar`.

This has come up before, it's not currently possible, but I think
there's interest in having it implemented.

-- 
Cheers,

Sverre Rabbelier

```
