git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Globbing for ignored branches?

From
MTMarkus Trippelsdorf <markus@trippelsdorf.de>
Date
Jan 24, 2014, 18:32 UTC
Message-ID
<20140124183222.GE396@x4>
In-Reply-To
<20140124182341.GB8202@sigill.intra.peff.net>
On 2014.01.24 at 13:23 -0500, Jeff King wrote:
Show 28 quoted lines
> 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.

Thanks. Yes, that was the question I wanted to ask (, sorry for not formulating it more clearly). Is this "negative refspec for branches" a feature that is planned for the future?

-- 
Markus
Previous: Jeff KingNext: Jeff King
Message 6 of 17 in “Globbing for ignored branches?”
  1. Markus TrippelsdorfJan 24, 2014
  2. Jim GarrisonJan 24, 2014
  3. Markus TrippelsdorfJan 24, 2014
  4. Markus TrippelsdorfJan 24, 2014
  5. Jeff KingJan 24, 2014
  6. Markus TrippelsdorfJan 24, 2014
  7. Jeff KingJan 24, 2014
  8. Junio C HamanoJan 24, 2014
  9. Markus TrippelsdorfJan 24, 2014
  10. Junio C HamanoJan 24, 2014
  11. Markus TrippelsdorfJan 24, 2014
  12. Jeff KingJan 24, 2014
  13. Junio C HamanoJan 24, 2014
  14. Jeff KingJan 25, 2014
  15. Markus TrippelsdorfJan 25, 2014
  16. Markus TrippelsdorfJan 25, 2014
  17. Jeff KingJan 25, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.