From: Ben Knoble Date: Mon, 19 Oct 2026 14:26:38 GMT Subject: Re: [PATCH] branch: let inherit track a remote-tracking start point Message-ID: <65ACF5B8-875F-40CB-A361-14452A38F405@gmail.com> In-Reply-To: > Le 18 oct. 2026 à 11:20, Harald Nordgren 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.)