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

Re: Help: Trying to setup triangular workflow

From
Jeff King <peff@peff.net>
Date
Jan 12, 2024, 07:31 UTC
Message-ID
<20240112073136.GG618729@coredump.intra.peff.net>
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:
Show 8 quoted lines
> 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
Previous: Matthew B. GrayNext: Matthew B. Gray
Message 2 of 3 in “Help: Trying to setup triangular workflow”
  1. Matthew B. GrayJan 12, 2024
  2. Jeff KingJan 12, 2024
  3. Matthew B. GrayJan 13, 2024

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.