问题描述
假设我有一个关于,我想将它克隆到我在github上的帐户中,让自己的操场摆脱fedorahosted上更官方的回购。最初复制的步骤是什么?
在github中有这个很好的fork按钮,但我不能明显地使用它。
我将如何跟踪fedorahosted回购GitHub的一个? 克隆从fedorahosted到您的本地机器的回购。
git remote rename origin upstream
git remote add origin URL_TO_GITHUB_REPO
git push origin master
现在您可以像使用其他github回购一样使用它了。要从上游获取补丁,只需运行 git pull upstream master&& git push origin master
。
Say I have a repository on git.fedorahosted.org and I want to clone this into my account at github to have my own playground aside from the more "official" repo on fedorahosted.What would be the steps to initially copy that over?Within github there is this nice "fork" button, but I can't use this for obvious reasons.
And how would I track changes in the fedorahosted repo into the github one?
- Create a new repo at github.
- Clone the repo from fedorahosted to your local machine.
git remote rename origin upstream
git remote add origin URL_TO_GITHUB_REPO
git push origin master
Now you can work with it just like any other github repo. To pull in patches from upstream, simply run git pull upstream master && git push origin master
.
这篇关于Git推动现有的回购到一个新的和不同的远程回购服务器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!