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

Re: Pushing symbolic references to remote repositories?

From
Shawn Pearce <spearce@spearce.org>
Date
Dec 21, 2012, 21:54 UTC
Message-ID
<CAJo=hJvqptfKqM+6J8Ddfb5qcqjAU8bB_JO9VB-XVsCCf64NUQ@mail.gmail.com>
In-Reply-To
<CAD03jn5ACZyxJM9LEOSJov3BsT3W1N0sV3WYwcerJciMSpmSPA@mail.gmail.com>
On Fri, Dec 21, 2012 at 11:53 AM, Dun Peal <dunpealer@gmail.com> wrote:
Show 14 quoted lines
> I need to share a symbolic reference - essentially, a named pointer to
> another reference - among multiple repositories.
>
> As shown in the code below, I can successfully create a local
> symbolic-ref `foo_ptr` to branch `foo`, but can't push it to a remote,
> in this case `origin`:
>
> $ git branch foo; git symbolic-ref foo_ptr refs/heads/foo; git rev-parse foo_ptr
> fbfec27dc6d42d48ca5d5b178caa34c666a4c39b
> $ git push origin foo foo_ptr
> error: dst ref refs/heads/foo receives from more than one src.
>
> Is there a clean and reliable way to do that, or are symbolic
> references just not meant to be shared?

There is no support for symbolic references in the network protocol, so they cannot currently be shared by git push or git fetch.

Previous: Dun PealNext: Junio C Hamano
Message 2 of 6 in “Pushing symbolic references to remote repositories?”
  1. Dun PealDec 21, 2012
  2. Shawn PearceDec 21, 2012
  3. Junio C HamanoDec 21, 2012
  4. Andreas SchwabDec 22, 2012
  5. Junio C HamanoDec 22, 2012
  6. Sitaram ChamartyDec 23, 2012

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.