首页 > 编程知识 正文

boat怎么导入模组,打造世界仓库怎么做

时间:2023-05-06 20:05:46 阅读:57754 作者:4097

1. Repo的基本结构

Repo包括Repo脚本、Repo库、管理库和项目库

2. 从0开始创建repo仓库

repo脚本:这是一个用于下载两个git库的python脚本: repo和manifest

获取repo脚本,权限curl https://mirrors.tuna.Tsinghua.edu.cn/git/git-repo-orepochmodxreporepo库: repo工具本身也是git Lara

获取单个repo库,并在其中一个目录下,首先获取环境变量repo _ urlexportrepo _ URL=' https://mirrors.tuna.Tsinghua.edu.cn/git/git

repo init当前目录中的. repo/repo是完整repo工具的git工程

项目库

项目库是使用repo管理的每个子项目的git仓库。 manifest库—用于记录整个repo的服务器地址、默认分支、gerrit服务器地址和每个子项目的git仓库地址等信息的这些信息都记录在xml文件中,并随时间更新

创建manifest.git目录,并使用git init将其初始化为git仓库

然后添加manifest.xml。 以下示例使用git add添加并提交到库中

其中的项目节点是否根据项目的实际路径添加? XML版本=' 1.0 '编码=' utf-8 '? manifestremotefetch='.' name=' origin '/default remote=' origin ' revision=' master ' sync-j='4' /项目名称

从现有repo创建repo的最简单方法是使用mirror参数

例如:

Repo init-u https://gitee.com/open harmony/manifest.git-b master-- mirror本地镜像远程repo的master分支,并使用此镜像仓库

操作后,根据是否使用mirror参数,可以看到获取的目录结构不同; 使用-mirror参数检索的目录下包含manifest.git目录,因此其他人可以使用repo initu mirror/manifest.git进行抽取。

参考链接:

Repo脚本分析: https://blog.csdn.net/stoic 163/article/details/78790349

Git-repo下载: https://mirrors.tuna.Tsinghua.edu.cn/help/git-repo /

开源软件下载:清华大学开源软件镜像站

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。