Different default remote (tracking branch) for git pull and git push

前端 未结 5 1953
情深已故
情深已故 2020-11-30 22:59

Is there a way to set up a git repository, so that git pull defaults to one remote and git push defaults to another? I know I can set both

5条回答
  •  鱼传尺愫
    2020-11-30 23:35

    From what I can gather from the git config man page, the upstream repo is:

    • by default origin
    • set by branch.remote
    • always for both git pull/fetch and git pull

    For a given branch, I don't see any way to have two separate remote by default.

提交回复
热议问题