Propagate a remote location via clone/push/pull

不想你离开。 提交于 2019-12-04 04:39:01

You can do it via .git/config. After you have successfully pulled or pushed your change, look at the .git/config file and make a note of the remote url and fetch

After the repository has been cloned by your developer(s), open up .git/config on the developers machine and add the line you have copied. Example -

[remote "vendor"]
    url = git@xxx.com:xxxxx/xxxxxxx.git
    fetch = +refs/heads/*:refs/remotes/origin/*

Your developers can now push or pull to vendor in this example.

If you need more control on writing the fetch url - there is excellent documentation on this at gitguys - http://goo.gl/JGaKD

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!