From: Jeff King Date: Mon, 09 May 2011 22:06:38 GMT Subject: Re: Separate default remotes for pulling and pushing Message-ID: <20110509220638.GB3719@sigill.intra.peff.net> In-Reply-To: <53DAF1E7-9906-4BF4-A64B-FE16BF5977F5@gmail.com> On Mon, May 09, 2011 at 12:01:53PM -0700, David Lee wrote: > > But now we have precedence questions. If I have config like: > > > > [push] > > defaultRemote = my-mirror > > > > [branch "foo"] > > remote = origin > > merge = refs/heads/master > > > > which remote should be the default for "git push"? Obviously if I'm not > > on "foo", it should be my-mirror. But if I am, should push.defaultRemote > > take precedence? Should there also be a branch.*.pushRemote config that > > takes precedence over branch.*.remote? > > > > I have to admit that I have never found the branch.*.remote config to be > > useful for any of my workflows, so I am not really sure how people use > > it. > > What about removing the branch.*.remote config by default, and if it's > not set, then it defaults to whatever the repo-wide setting is for > defaultRemote? Then a branch.*.remote would override the > defaultRemote, and a branch.*.pushRemote would again override that. The branch.*.remote config does much more, though. For example, it is part of the "upstream" branch config. So getting rid of it is definitely not an option. -Peff