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

Re: Excluding some refspecs from git push?

From
SPShawn Pearce <sop@google.com>
Date
Jul 24, 2011, 19:19 UTC
Message-ID
<CAH+XAApbbMSPW9XJPjYnmqNiECoWBz5du6CeD_hfAww9o_LcXA@mail.gmail.com>
In-Reply-To
<20110724004650.408741c5@x34f>

On Sat, Jul 23, 2011 at 14:46, Paul Sokolovsky <paul.sokolovsky@linaro.org> wrote:

Show 11 quoted lines
> Is there a way to exclude some refspec from being processed by "git
> push"? What I'm looking for is a syntax like:
>
> push some-remote 'refs/*' '!refs/meta/config'
>
> , with the meaning of "push all refs except refs/meta/config". What I'm
> trying to do with this is to find out a generic way to mirror git
> repositories managed by the Gerrit tool
> (http://code.google.com/p/gerrit/), which since version 2.2 uses
> refs/meta/config branch to store repository-local configuration, so
> should not be mirrored between two Gerrit's.

Unfortunately no. But you should be able to just mirror the namespaces that matter:

  refs/heads/*
  refs/tags/*

Its not a good idea to mirror refs/meta/config unless you want the same access controls, *AND ITS REALLY NOT A GOOD IDEA TO MIRROR refs/changes/* BETWEEN GERRIT SERVERS*. Yes, that last part is worth writing in full caps.

Previous: Paul SokolovskyNext: Magnus Bäck
Message 2 of 4 in “Excluding some refspecs from git push?”
  1. Paul SokolovskyJul 23, 2011
  2. Shawn PearceJul 24, 2011
  3. Magnus BäckJul 24, 2011
  4. Shawn PearceJul 24, 2011

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.