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 ?

parsley72
  • 6,932
  • 8
  • 54
  • 78
johnlemon
  • 18,991
  • 36
  • 111
  • 174

2 Answers2

3

Yes, default.xml must be in its own git repository.

Easiest way to understand how repo works is to see how Android project (guys who created it in first place) do it.

You should init Android example of manifest as described here:

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

You can then download Android source tree using repo sync, but it may take a while and 10GB+ of disk space and is not strictly necessary for your investigation, but if you do it, you will understand it better.

Then, take a look at directory .repo - inside you will find manifest git repository checked out.

I would suggest taking this as working example, and then removing everything you don't want or don't need and tweaking to your needs.

mvp
  • 94,368
  • 12
  • 106
  • 137
  • I know about android example but that is not enought. Do I have to create an bare git repository and commit the default xml in it ? – johnlemon Jan 15 '13 at 08:09
  • `repo init -u url` expects url for manifest repo that `git clone url` can understand. So, certainly, it does not have to be bare repo on a server, but once everything said and done, it better be – mvp Jan 15 '13 at 08:24
3

First, you should create a manifest git repository. The manifest repository contains default.xml, which explains your project.

Then, use repo init -u "your manifest repository path" and repo sync in client.

Please refer the post below.

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

Haifeng Li
  • 457
  • 4
  • 15