本文介绍了如何更改我的github回购的远程源?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我分叉了一个回购,并在我的本地机器上设置了一切。但是,当我做'git remote -v'时,它显示原始回购作为我的提取和推送源。我想从我的分叉回购。我怎么改变它,而不是从头开始?然后,如何向原始回购添加上游?
解决方案我分叉了一个回购,并在我的本地机器上设置了一切。但是,当我做'git remote -v'时,它显示原始回购作为我的提取和推送源。我想从我的分叉回购。我怎么改变它,而不是从头开始?然后,如何向原始回购添加上游?
解决方案从:
git remote set-url origin https://github.com/user/forkname
git remote add upstream https://github.com/maintainer/reponame
另见。
set-url
然后,您将能够从上游获取并推送至原点:
请参阅。
I forked a repo and set everything up on my local machine. However, when I do 'git remote -v' it shows the original repo as my fetch and push source. I want it to by from my forked repo. How do I change it over to that without starting all over? And then, how do I add an upstream to the original repo?
From the git remote man page:
git remote set-url origin https://github.com/user/forkname
git remote add upstream https://github.com/maintainer/reponame
See also the examples of GitHub: Changing a remote's URL.
set-url
You will then be able to fetch from upstream, and push to origin:
See "What is the difference between origin
and upstream
in Github".
这篇关于如何更改我的github回购的远程源?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!