从远程混帐服务器同步远程分支 [英] Sync remote branch from remote git server

查看:155
本文介绍了从远程混帐服务器同步远程分支的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有镜子所有的Andr​​oid库到我的本地库,但随着新版本的发布,我发现它很难从上游更新。

I have mirror all android repository into my local repository, but with new version release I found it it hard to update from upstream.

下面是详细信息:

我镜像Android源后,我的修改是在我自己的分支我的私人服务器上我-JB-MR1。我-JB-MR1从AOSP JB-MR1支。

After I mirror android source, my modification is in my own branch my-jb-mr1 on my private server. my-jb-mr1 is branched from aosp jb-mr1.



  • ...

  • JB-MR1

  • 我-JB-MR1

现在奇巧是AOSP版本中,我发现我不知道如何更新我的私人服务器,以跟踪上AOSP。我的想法是

Now kitkat is release on aosp, I found I don't know how to update my private server to keep track on aosp. My idea is


  1. 合并AOSP高手我的本地库的主人,然后推到我的私人服务器

  2. 分行根据AOSP分支节点的code

但这似乎不工作。因为我想跟踪在AOSP的分支是奇巧,开发和奇巧释放。在AOSP主分支不包括目标分支中的所有提交。

But this seems does not work. Because the branch on aosp I want to keep track is kitkat-dev and kitkat-release. The master branch on aosp does not include all commits within the target branch.

我要的是从AOSP同步。同步后,存储库是这样的:

What I want is to sync from aosp. After sync, the repository is like:



  • ...

  • JB-MR1

  • 奇巧-dev的

  • 奇巧释放

  • 我-JB-MR1

奇巧释放和奇巧-dev的应完全与AOSP分支一样的。

kitkat-release and kitkat-dev should exactly the same with the branch on aosp.

可以在任何人给我一些提示如何处理这种情况?

Could any one give me some hint how to handle this case?

推荐答案

通常AOSP的主分支将是最新的版本分支的一个超集,但我不知道是这样的话,现在,你的问题似乎确认。不要期望它是真实的一切的时候,尤其不能释放之后。

Normally the master branch of AOSP will be a superset of the most recent release branch, but I'm not sure that's the case right now and your question seems to confirm that. Don't expect it to be true all the time, especially not right after a release.

要推奇巧分支到服务器,从服务器AOSP同步一个工作区启动:

To push the Kitkat branches to your server, start by syncing a workspace from the AOSP servers:

repo init --mirror -u https://android.googlesource.com/platform/manifest -b kitkat-dev

通常我会建议同步镜表现为在的使用文档的本地镜像一部分,但现在镜子清单不包含奇巧添加的所有控释片。我希望他们不久将加入。

Normally I'd suggest syncing the mirror manifest as described in the Using a local mirror part of the documentation, but right now the mirror manifest doesn't contain all gits that were added in Kitkat. I expect them to be added shortly.

在同步完成后,步入工作区,并推动新的分支机构到你的服务器:

When the sync is done, step into the workspace and push the new branches to your server:

repo forall -c 'git push ssh://yourserver.example.com/$REPO_PROJECT aosp/kitkat-dev:refs/heads/kitkat-dev aosp/kitkat-release:refs/heads/kitkat-release

您还可以使用通配符来推动的所有的AOSP分支服务器:

You can also use wildcards to push all AOSP branches to your server:

repo forall -c 'git push ssh://yourserver.example.com/$REPO_PROJECT aosp/*:refs/heads/*

这篇关于从远程混帐服务器同步远程分支的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆