Git development
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: "Matthew B. Gray" <hey@matthew.nz>
Cc: git@vger.kernel.org
Subject: Re: Help: Trying to setup triangular workflow
Date: Fri, 12 Jan 2024 02:31:36 -0500	[thread overview]
Message-ID: <20240112073136.GG618729@coredump.intra.peff.net> (raw)
In-Reply-To: <b59c59f6-29e1-4d67-bace-13adcc108454@app.fastmail.com>

On Fri, Jan 12, 2024 at 03:23:58PM +1300, Matthew B. Gray wrote:

> Here's what I get from running the documented example:
> 
>   λ git config push.default current
>   λ git config remote.pushdefault myfork
>   λ git switch -c mybranch origin/main
>   λ git push
>   * [new branch]          mybranch -> mybranch
>   branch 'mybranch' set up to track 'myfork/mybranch'.

This push step is rewriting your upstream config. Do you have
push.autoSetupRemote configured? In general you wouldn't want that for a
triangular flow.

Though I think it also is only supposed to kick in if there is no
tracking configured already. Why did the "git switch" invocation not set
up tracking itself? When I run those commands it does. Do you have
branch.autoSetupMerge turned off in your config?

-Peff

  reply	other threads:[~2024-01-12  7:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-12  2:23 Help: Trying to setup triangular workflow Matthew B. Gray
2024-01-12  7:31 ` Jeff King [this message]
2024-01-13  0:45   ` Matthew B. Gray

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=20240112073136.GG618729@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=hey@matthew.nz \
    /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