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

Re: Best way to update `HEAD` in mirrored repos

From
RMRodrigo Silva Mendoza <rodrigosilvamendoza3@gmail.com>
Date
Jun 9, 2022, 05:01 UTC
Message-ID
<CANWRddPDhM1g6rtu-a2a=EogXD_hOFwSDsgMCbVvB7dibMaEqw@mail.gmail.com>
In-Reply-To
<xmqq5ylapy0s.fsf@gitster.g>
Great, thanks for the confirmation. Appreciate it!
Rodrigo
On Wed, Jun 8, 2022 at 3:54 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 21 quoted lines
>
> Rodrigo Silva Mendoza <rodrigosilvamendoza3@gmail.com> writes:
>
> > What I've got that I think works
> > 1. Get the ref from the origin that points to `HEAD`. Extract the ref
> > from the output.
> > 2. Manually update the `HEAD` ref with the extracted output prior step
> >
> > Like so:
> > ```
> > $ git ls-remote --symref origin HEAD
> > ref: refs/heads/good_main_3     HEAD
> > 0666a519f94b8500ab6f14bdf7c9c2e5ca7d5821        HEAD
> >
> > $ git symbolic-ref HEAD refs/heads/good_main_3
> > ```
> >
> > Does this make sense?
>
> Yes.  That soudns like the right thing to do.
>
Previous: Junio C HamanoNext: Johannes Schindelin
Message 3 of 9 in “Best way to update `HEAD` in mirrored repos”
  1. Rodrigo Silva MendozaJun 8, 2022
  2. Junio C HamanoJun 8, 2022
  3. Rodrigo Silva MendozaJun 9, 2022
  4. Johannes SchindelinJun 9, 2022
  5. Rodrigo Silva MendozaJun 9, 2022
  6. Johannes SchindelinJun 10, 2022
  7. Junio C HamanoJun 10, 2022
  8. Rodrigo Silva MendozaJun 15, 2022
  9. Rodrigo Silva MendozaJun 15, 2022

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.