From: Felipe Contreras Date: Wed, 18 Nov 2020 09:04:25 GMT Subject: Re: [PATCH 00/28] Use main as default branch name Message-ID: In-Reply-To: <20201118020618.GE650959@coredump.intra.peff.net> On Tue, Nov 17, 2020 at 8:06 PM Jeff King wrote: > On Tue, Nov 17, 2020 at 07:45:21PM -0600, Felipe Contreras wrote: > > The equivalent of this choice is in "git remote add -m": > > > > With `-m ` option, a symbolic-ref `refs/remotes//HEAD` > > is set up to point at remote's `` branch. See also the > > set-head command. > > Wow, I'm not sure how that option escaped my notice for all these years. > Of course it would be much more useful if it pulled the value from the > remote HEAD (but again, unless we use "-f" we are not contacting the > remote at all). Seems to come basically untouched since 2007: b6f5da1e0f (Teach git-remote add to fetch and track) > And then it is just a question of what the default is. Currently it is > "never". I suspect most people would be happy with "always", but it does > break some existing flows. But perhaps "create-if-missing" is a good > medium. Agreed. Personally I don't see any problem with "create-if-missing", but creating a configuration and defaulting to "never" should be a good first step. I'm sending an RFC patch to that effect. Cheers. -- Felipe Contreras