From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS3215 2.6.0.0/16 X-Spam-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_CSS,URIBL_CSS_A shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by dcvr.yhbt.net (Postfix) with ESMTP id 1C5FD1F4D7 for ; Wed, 8 Jun 2022 22:54:39 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (1024-bit key; unprotected) header.d=pobox.com header.i=@pobox.com header.b="K+xE3yne"; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236971AbiFHWyH (ORCPT ); Wed, 8 Jun 2022 18:54:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36016 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236471AbiFHWyE (ORCPT ); Wed, 8 Jun 2022 18:54:04 -0400 Received: from pb-smtp20.pobox.com (pb-smtp20.pobox.com [173.228.157.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A1B30353B17 for ; Wed, 8 Jun 2022 15:54:01 -0700 (PDT) Received: from pb-smtp20.pobox.com (unknown [127.0.0.1]) by pb-smtp20.pobox.com (Postfix) with ESMTP id 56569192C67; Wed, 8 Jun 2022 18:54:00 -0400 (EDT) (envelope-from junio@pobox.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=w1UxEROnI6HDRmf/HueyXvDZ6/XnADEBBUVsFM JX2HY=; b=K+xE3yne2OmFGTj2zgIrSWH3O6c0ceXK2G9CdXDG6M4/7kqAnTomjW taXKcqPFTuw8BEby4c33nxjp6zJsUbCX5i8I78BAYLpVA4iVwEVhtUoUkDxLIQYM iEqU2OrxOQ9iC4gdKHak0UjyN86SEEDe/U3o6dvNDFHkFoA472Z8E= Received: from pb-smtp20.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp20.pobox.com (Postfix) with ESMTP id 4FC8E192C65; Wed, 8 Jun 2022 18:54:00 -0400 (EDT) (envelope-from junio@pobox.com) Received: from pobox.com (unknown [34.83.92.57]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp20.pobox.com (Postfix) with ESMTPSA id F1437192C63; Wed, 8 Jun 2022 18:53:56 -0400 (EDT) (envelope-from junio@pobox.com) From: Junio C Hamano To: Rodrigo Silva Mendoza Cc: git@vger.kernel.org Subject: Re: Best way to update `HEAD` in mirrored repos References: Date: Wed, 08 Jun 2022 15:53:55 -0700 In-Reply-To: (Rodrigo Silva Mendoza's message of "Wed, 8 Jun 2022 13:36:02 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: E0CB95B0-E77D-11EC-88E0-C85A9F429DF0-77302942!pb-smtp20.pobox.com Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Rodrigo Silva Mendoza 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.