Thread (7 messages) flat view 7 messages, 3 authors, 2016-06-15

Re: Separate default remotes for pulling and pushing

From: David Lee <hidden>
Date: 2016-06-15 22:51:12

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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help