更改本地分支跟踪的远程

时间:2015-10-14 01:02:13

标签: git github

我分叉了一个仓库,并将我的原点从origin远程重命名为danny。然后我设置了一个名为origin的新遥控器,它将转到原始仓库。

运行git remote -v会返回以下输出:

danny   https://github.com/DannyDelott/repo.git (fetch)
danny   https://github.com/DannyDelott/repo.git (push)
origin  https://github.com/org/repo.git (fetch)
origin  https://github.com/org/repo.git (push)

后来,我被添加为原始回购的合作者。现在,我想更改远程master分支正在从danny遥控器跟踪到我的新origin遥控器。

例如,现在如果我运行git status,我会得到以下输出:

On branch master
Your branch is ahead of 'danny/master' by 24 commits.

我无意再离开我的叉子了。我当前的本地主副本超出我的fork副本的事实不再重要。

如何让我的master分支跟踪origin/master

0 个答案:

没有答案
相关问题