Re: Help: Trying to setup triangular workflow
- From
- Matthew B. Gray <hey@matthew.nz>
- Date
- Jan 13, 2024, 00:45 UTC
- Message-ID
- <bf59af5d-1a59-41bb-b693-087b940e266b@app.fastmail.com>
- In-Reply-To
- <20240112073136.GG618729@coredump.intra.peff.net>
Hi Peff,
> 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.
Thanks for the pointer, yes have both push.autoSetupRemote and branch.autoSetupMerge set. Turning these off has fixed my problem.
With neither option set the example yields:
@{upstream}: refs/remotes/origin/main
@{push}: refs/remotes/myfork/mybranchWith push.autosetupremote=true set:
@{upstream}: refs/remotes/origin/main
@{push}: refs/remotes/myfork/mybranchWith branch.autoSetupMerge=simple set:
@{upstream}:
@{push}: refs/remotes/myfork/mybranchWith branch.autoSetupMerge=simple and push.autosetupremote=true:
@{upstream}: refs/remotes/myfork/mybranch
@{push}: refs/remotes/myfork/mybranch> 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?
If you're interested in looking at my full gitconfig it's hosted here: https://github.com/heymatthew/dotfiles/blob/trunk/softlinks/.gitconfig
However looks like taking those out of global config has fixed my issue. Thanks for the help!
Ngā mihi, Matthew