从公共资源到原始存储库的一切拉动/推入

时间:2019-02-22 19:24:18

标签: git github

我使用导入存储库工具从github上的开放源存储库(openRepo)中获取了代码。这会将代码导入到我的私人仓库RepoA中,并包含所有分支和标签。 我想做两件事:

问题1: 我希望repoA由openRepo的新代码更新。所有新的分支和标签也应更新。

所以我将repoA链接到openRepo:

 git remote add public https://github.com/openRepo/A.git
 git pull public master
 git push origin master

这有效,但仅更新master分支。 它不会接新的分支。

问题2: 我想对RepoA进行自定义更改,因此我从RepoA中选择了latest_stable_branch,并在RepoA中创建了一个名为devbranch的新分支。 然后,我向其中添加了一些代码。 目前,RepoA中的devbranch领先于RepoA和OpenRepo中的latest_stable_branch(因为两者相同)。

问题是当OpenRepo发布另一个稳定分支时,我想要该代码以及我的devbranch中的代码。 而且我不知道该怎么做。

0 个答案:

没有答案
相关问题