From: Junio C Hamano <gitster@pobox.com>
To: Rodrigo Silva Mendoza <rodrigosilvamendoza3@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Best way to update `HEAD` in mirrored repos
Date: Wed, 08 Jun 2022 15:53:55 -0700 [thread overview]
Message-ID: <xmqq5ylapy0s.fsf@gitster.g> (raw)
In-Reply-To: <CANWRddN4R6AceeaOyZm1vs8AXBNv3J+cE5MOyrhKVhcqddjUOA@mail.gmail.com> (Rodrigo Silva Mendoza's message of "Wed, 8 Jun 2022 13:36:02 -0700")
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.
next prev parent reply other threads:[~2022-06-08 22:54 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-08 20:36 Best way to update `HEAD` in mirrored repos Rodrigo Silva Mendoza
2022-06-08 22:53 ` Junio C Hamano [this message]
2022-06-09 5:01 ` Rodrigo Silva Mendoza
2022-06-09 8:02 ` Johannes Schindelin
2022-06-09 14:46 ` Rodrigo Silva Mendoza
2022-06-10 21:46 ` Johannes Schindelin
2022-06-10 21:53 ` Junio C Hamano
2022-06-15 4:11 ` Rodrigo Silva Mendoza
2022-06-15 4:18 ` Rodrigo Silva Mendoza
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqq5ylapy0s.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=rodrigosilvamendoza3@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.