From: Ben Knoble <ben.knoble@gmail.com>
To: Harald Nordgren <haraldnordgren@gmail.com>
Cc: phillip.wood@dunelm.org.uk, Junio C Hamano <gitster@pobox.com>,
Harald Nordgren via GitGitGadget <gitgitgadget@gmail.com>,
git@vger.kernel.org, Josh Steadmon <steadmon@google.com>
Subject: Re: [PATCH] branch: let inherit track a remote-tracking start point
Date: Mon, 19 Oct 2026 10:26:38 -0400 [thread overview]
Message-ID: <65ACF5B8-875F-40CB-A361-14452A38F405@gmail.com> (raw)
In-Reply-To: <CAHwyqnV=iiocV2FA32-X8LTgYwWmzQguPtkykFKM-t7B7ttNOw@mail.gmail.com>
> Le 18 oct. 2026 à 11:20, Harald Nordgren <haraldnordgren@gmail.com> a écrit :
>
>
>>
>> For me it depends on what I'm forking from. If I create a branch on my
>> desktop, push it to my server and then create a local branch from that
>> on my laptop, I normally want the new branch to track something like
>> origin/master rather than the starting point. However, if I create a new
>> branch from origin/master then I do want to track the starting point. So
>> it is not clear to me that the behavior proposed here is better than the
>> current behavior, but equally I don't think it is any worse. Having some
>> way of saying "set up tracking when the starting point matches one of
>> these patterns" might be useful, but I find the tracking options to "git
>> switch -c" so confusing I normally just run "git branch
>> --set-upstream-to" afterwards to set the upstream I want.
>
> I don't actually use 'git switch -c', I just used that in the example
> because it's the *modern* way to do things. In reality I always run
> 'git checkout -b'. I agree about `set-upstream-to`, there is probably
> no single terminal command that I run more than
>
> git branch --set-upstream-to=origin
Curious. I typically do
git switch -c topic origin
and am happy. (When creating a branch that *doesn’t* start
at origin but still should track it, I use « branch -u » as shown, too.)
prev parent reply other threads:[~2026-10-19 14:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-16 7:02 [PATCH] branch: let inherit track a remote-tracking start point Harald Nordgren via GitGitGadget
2026-10-16 16:55 ` Junio C Hamano
2026-10-17 9:54 ` Harald Nordgren
2026-10-19 14:25 ` Ben Knoble
2026-10-19 20:06 ` Junio C Hamano
2026-10-18 9:59 ` Phillip Wood
2026-10-18 15:19 ` Harald Nordgren
2026-10-19 14:26 ` Ben Knoble [this message]
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=65ACF5B8-875F-40CB-A361-14452A38F405@gmail.com \
--to=ben.knoble@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=gitster@pobox.com \
--cc=haraldnordgren@gmail.com \
--cc=phillip.wood@dunelm.org.uk \
--cc=steadmon@google.com \
/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