建本地 repo server
来源:互联网 发布:java集合框架中迭代器 编辑:程序博客网 时间:2024/05/21 17:22
首先 建立一个git server 参考前面的gentoo git server搭建过程
From: http://xxw8393.blog.163.com/blog/static/372568342011112111028926/
制作android服务器镜像
view plaincopy to clipboardprint?
- $ mkdir /home/git/android/
- $ chown nobody.nobody /home/git/android/
- $ cd /home/git/android/
- $ repo init -u git://android.git.kernel.org/platform/manifest.git --mirror
- $ repo sync
建立版本库
view plaincopy to clipboardprint?- $ mkdir /home/git/our-repository
- $ cd /home/git/our-repository
-
- $ repo init -u git://your-server-ip/android/platform/manifest.git --mirror
view plaincopy to clipboardprint?
- $ mkdir /home/git/our-repository
- $ cd /home/git/our-repository
- $ repo init -u git://your-server-ip/android/platform/manifest.git --mirror
修改.repo/manifest.xml
view plaincopy to clipboardprint?- - fetch="git://android.git.kernel.org/"
- + fetch="git://your-server-ip/android/"
-
- $ repo sync
修改.repo/manifest.xml
view plaincopy to clipboardprint?
- - fetch="git://android.git.kernel.org/"
- + fetch="git://your-server-ip/android/"
- $ repo sync
创建团队的master-2.1_r2开发分支
下载android-2.1_r2代码
view plaincopy to clipboardprint?- $ mkdir my-android-code
- $ cd my-android-code
- $ repo init -u git://your-server-ip/our-repository/platform/manifest.git –b android-2.1_r2
按提示输入自己的用户名和邮箱即可
修改.repo/manifest.xml
view plaincopy to clipboardprint?- - fetch="git://android.git.kernel.org/"
- + fetch="git://your-server-ip/our-repository/"
-
- $ repo sync
等10分钟左右,代码下载完成。
2、下载完成后建立主干开发分支
view plaincopy to clipboardprint?- $ repo start master-2.1_r2 --all
3、设置远程仓库的别名为my-korg
view plaincopy to clipboardprint?- $repo forall -c 'git remote add mykorg /pub/gittrees/our-repository/\
- $REPO_PROJECT.git $@'
注:删除myorg:
$ repo forall -c git remote rm myorg
4、将分支提交至公共版本仓库
view plaincopy to clipboardprint?- $ repo forall -c git push myorg master-2.1_r2:refs/heads/master-2.1_r2
- $ repo sync
5、为你的公共版本库建立manifest分支
view plaincopy to clipboardprint?- $ cd my-android-code/.repo/manifests
- $ git checkout -b master-2.1_r2
- $ vi default.xml
按如下方式修改
view plaincopy to clipboardprint?- <manifest>
- <remote name="korg"
- - fetch="git://android.git.kernel.org/"
- + fetch="git://your-server-ip/our-repository/" review="review.source.android.com" />
- - <default revision="refs/tags/android-2.1_r2"
- + <default revision="refs/heads/master-2.1_r2"
- remote="korg" />
修改完成后提交并将branch提交至公共版本库
view plaincopy to clipboardprint?- $git commit -a
- $git remote add our-repository /home/git/your-repository/platform/manifest.git
- $git push your-repository master-2.1_r2:refs/heads/master-2.1_r2
现在我们自己团队的公共版本库创建完成。
公共版本库的路径为:
/home/git/our-repository /
外部可访问仓库地址为:
git://your-server-ip/your-repository/platform/manifest.git
Repo访问方法:
view plaincopy to clipboardprint?- $repo init -u git://your-server-ip/our-repository/platform/manifest.git –b master-2.1_r2
下载android-2.1_r2代码
view plaincopy to clipboardprint?
- $ mkdir my-android-code
- $ cd my-android-code
- $ repo init -u git://your-server-ip/our-repository/platform/manifest.git –b android-2.1_r2
按提示输入自己的用户名和邮箱即可
修改.repo/manifest.xml
view plaincopy to clipboardprint?
- - fetch="git://android.git.kernel.org/"
- + fetch="git://your-server-ip/our-repository/"
- $ repo sync
等10分钟左右,代码下载完成。
2、下载完成后建立主干开发分支
view plaincopy to clipboardprint?
- $ repo start master-2.1_r2 --all
3、设置远程仓库的别名为my-korg
view plaincopy to clipboardprint?
- $repo forall -c 'git remote add mykorg /pub/gittrees/our-repository/\
- $REPO_PROJECT.git $@'
注:删除myorg:
$ repo forall -c git remote rm myorg
4、将分支提交至公共版本仓库
view plaincopy to clipboardprint?
- $ repo forall -c git push myorg master-2.1_r2:refs/heads/master-2.1_r2
- $ repo sync
5、为你的公共版本库建立manifest分支
view plaincopy to clipboardprint?
- $ cd my-android-code/.repo/manifests
- $ git checkout -b master-2.1_r2
- $ vi default.xml
按如下方式修改
view plaincopy to clipboardprint?
- <manifest>
- <remote name="korg"
- - fetch="git://android.git.kernel.org/"
- + fetch="git://your-server-ip/our-repository/" review="review.source.android.com" />
- - <default revision="refs/tags/android-2.1_r2"
- + <default revision="refs/heads/master-2.1_r2"
- remote="korg" />
修改完成后提交并将branch提交至公共版本库
view plaincopy to clipboardprint?
- $git commit -a
- $git remote add our-repository /home/git/your-repository/platform/manifest.git
- $git push your-repository master-2.1_r2:refs/heads/master-2.1_r2
现在我们自己团队的公共版本库创建完成。
公共版本库的路径为:
/home/git/our-repository /
外部可访问仓库地址为:
git://your-server-ip/your-repository/platform/manifest.git
Repo访问方法:
view plaincopy to clipboardprint?
- $repo init -u git://your-server-ip/our-repository/platform/manifest.git –b master-2.1_r2
0 0
- 建本地 repo server
- 建本地 repo server
- 建本地 repo server
- 建本地 repo server
- repo server
- 建立本地repo 管理仓库
- 本地/远程搭建repo服务器
- yum 设置本地 repo 源
- Repo建立本地仓库脚本
- CentOS 在本地部署repo
- Centos7 配置本地Yum repo
- Linux 创建本地YUM Repo
- Linux - Build repo/git server
- 创建自己的Repo Server
- git server搭建成功 & repo
- [Fedora 6] yum本地repo安装
- [转][fedora 6]yum本地repo安装
- 使用DVD做本地的yum repo
- CGLIB动态代理
- JAVA中的集合
- 跨域问题
- VirtualBox的虚拟机镜像在Vmware里无法安装
- linux 下,解决tomcat服务器接收中文乱码的问题
- 建本地 repo server
- 超大多重背包问题
- [leetcode] 165. Compare Version Numbers 解题报告
- Barbican dev 环境安装及工作原理
- Activity之间传递Handler
- Unity 5.2.3 Android 开发入门
- 3、读取xls文件示例
- linux bash shell 判断目录是否为空的函数
- dos 添加防火墙入站规则