2

I'm trying to use git repo for my own project. I understand I have to create a default.xml file and using to link to all the repositories available but It's not clear how to do that. I tried creating a simple xml file and put in on a server. I also added 2 remote configurations and projects.

From what I read the default.xml file must also be in a repository but this step is not clear.

When I try to use the command repo init -u http:// my_custom_url /manifest/ I get a curl download error.

Any advice or steps I have to take in order to create the default manifest ?

4

2 回答 2

3

首先,您应该创建一个清单 git 存储库。清单存储库包含 default.xml,它解释了您的项目。

然后,在客户端中使用repo init -u "your manifest repository path"repo sync

请参考下面的帖子。

http://www.instructables.com/id/Using-Googles-repo-command-in-your-own-projects

于 2014-12-30T03:18:25.920 回答
3

是的,default.xml必须在它自己的 git 存储库中。

了解其repo工作原理的最简单方法是查看 Android 项目(首先创建它的人)是如何做到的。

您应该按照此处所述初始化 Android 清单示例:

repo init -u https://android.googlesource.com/platform/manifest

然后,您可以使用 下载 Android 源代码树repo sync,但这可能需要一段时间和 10GB 以上的磁盘空间,并且对于您的调查并不是绝对必要的,但如果您这样做,您会更好地理解它。

然后,查看目录.repo- 在里面你会发现清单 git 存储库已签出。

我建议将此作为工作示例,然后删除您不想要或不需要的所有内容并根据您的需要进行调整。

于 2013-01-15T07:29:23.803 回答