我分叉了一个仓库,并将我的原点从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
?