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/mybranchMy 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/mybranchI 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