From: Junio C Hamano <gitster@pobox.com>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: crstml@libero.it, git@vger.kernel.org
Subject: Re: connecting the local main branch to the remote origin/main without pushing
Date: Sat, 28 Dec 2024 09:20:36 -0800 [thread overview]
Message-ID: <xmqqikr33esb.fsf@gitster.g> (raw)
In-Reply-To: <87h66nk9uy.fsf@igel.home> (Andreas Schwab's message of "Sat, 28 Dec 2024 18:15:01 +0100")
Andreas Schwab <schwab@linux-m68k.org> writes:
> On Dez 28 2024, crstml@libero.it wrote:
>
>> My question is:
>> Is it possible when applying the method 2 to have (without pushing)
>> the local main branch connected to the remote origin/main branch as
>> in the case of method 1 which by cloning connects these branches.
>
> You can establish the effect by setting two config entries:
>
> $ git config branch.main.remote origin
> $ git config branch.main.merge refs/heads/main
Perfect ;-) Thanks.
next prev parent reply other threads:[~2024-12-28 17:20 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-28 15:47 connecting the local main branch to the remote origin/main without pushing crstml
2024-12-28 16:11 ` rsbecker
2024-12-29 9:01 ` crstml
2024-12-28 17:15 ` Andreas Schwab
2024-12-28 17:20 ` Junio C Hamano [this message]
2024-12-28 19:08 ` Jeff King
2024-12-28 19:39 ` Andreas Schwab
2024-12-29 10:01 ` crstml
2024-12-29 14:39 ` rsbecker
2024-12-29 10:03 ` crstml
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=xmqqikr33esb.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=crstml@libero.it \
--cc=git@vger.kernel.org \
--cc=schwab@linux-m68k.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).