Re: Globbing for ignored branches?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 24, 2014 at 06:09:09PM +0100, Markus Trippelsdorf wrote:

> > > If you mean "ignore" in some other scenario you need to be more
> > > specific about what you want.
> > 
> > I want to them when I run "git pull".
>            ignore

I assume you mean that you do not want to fetch them at all, not that
you want to avoid merging them. The set of branches that git fetches is
configured by the fetch "refspec" in your config file. It usually looks
like this:

  $ git config remote.origin.fetch
  +refs/heads/*:refs/remotes/origin/*

But you can specify a specific list of branches you want to fetch
instead:

  $ git config --unset remote.origin.fetch
  $ for i in master other-branch; do
      git config --add remote.origin.fetch \
                       +refs/heads/$i:refs/remotes/origin/$i
    done

However, you do have to specify each branch individually. You probably
want to say "all branches except X", and you cannot currently specify
a negative refspec like that.

-Peff
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]