Will remote URL for fetch and push be different?

后端 未结 2 1349
傲寒
傲寒 2020-12-25 11:03

git remote --v show remote info

origin  https://github.com/test/testing-iOS.git (fetch)
origin  https://github.com/test/testing-iOS.git (push)
2条回答
  •  星月不相逢
    2020-12-25 11:18

    From documentation, Fetch and Push URLs should be same.

    http://git-scm.com/docs/git-remote

    Command to set Push and fetch urls

    'git remote set-url' [--push]   []
    

    Note that the push URL and the fetch URL, even though they can be set differently, must still refer to the same place. What you pushed to the push URL should be what you would see if you immediately fetched from the fetch URL. If you are trying to fetch from one place (e.g. your upstream) and push to another (e.g. your publishing repository), use two separate remotes.

提交回复
热议问题