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

Help: Trying to setup triangular workflow

From
MGMatthew B. Gray <hey@matthew.nz>
Date
Jan 12, 2024, 02:23 UTC
Message-ID
<b59c59f6-29e1-4d67-bace-13adcc108454@app.fastmail.com>
 Hello

I am trying to set up a triangular workflow against a fork. The example I'm using is documented here: https://git-scm.com/docs/gitrevisions

Here's the example:
  $ git config push.default current
  $ git config remote.pushdefault myfork
  $ git switch -c mybranch origin/master
  $ git rev-parse --symbolic-full-name @{upstream}
  refs/remotes/origin/master
  $ git rev-parse --symbolic-full-name @{push}
  refs/remotes/myfork/mybranch
My setup looks like this:
  λ git -v
  git version 2.43.0
  λ git remote -vv
  myfork git@github.com:heymatthew/dactyl-configurator-fork (fetch)
  myfork git@github.com:heymatthew/dactyl-configurator-fork (push)
  origin https://github.com/rianadon/dactyl-configurator (fetch)
  origin https://github.com/rianadon/dactyl-configurator (push)
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'.
  λ git rev-parse --symbolic-full-name @{upstream}
  refs/remotes/myfork/mybranch
  λ git rev-parse --symbolic-full-name @{push}
  refs/remotes/myfork/mybranch

I was expecting @{upstream} to be origin/main, but it appears that @{u} and @{p} are the same.

Am I doing something wrong? Are there better examples someone can point me at to do this?

Thanks in advance :)

Ngā mihi, Matthew

Next: Jeff King
Message 1 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.