Manage Firefox OS Gaia modules with 'repo' command

[email protected]

Manage Firefox OS Gaia modules with 'repo' command

Filed in 883711 by Fred Lin (gasolin)


  1. Why change
  2. Organize gaia gits
  3. Get and update gaia gits
  4. Development Settings

Why Change?

  1. Identify Reusable Components
  2. Encourage Community Contribution

Separate gaia components for public reuse and encourage the community contribution.

Why use 'repo' command?

  1. Separate repositories in Unobstructive way
  2. Can use current git trick or get more productive with repo command
  3. keep friendly with device build process

'repo' command use a default.xml to organize multiple gits separately from origin git.

How repositories get organized (proposal)

  1. gaia-exp: origin gaia-master remove shared folder
  2. gaia-shared-style: shared/style (stable building block)
  3. gaia-shared-style-unstable: shared/style-unstable (unstable building block)

Get gaia gits

Setup with repo command

			get all gits from public repositories:
			$ mkdir gaiaexp && cd gaiaexp
			$ repo init -u
			$ repo sync

'repo' command clone and update all gits defined in default.xml.

Maintain different versions

  1. git branch on each repository (ex: git branch v1.2.0)
  2. git branch the git-repo.git and modify the branch in default.xml
    <project remote="gaia" revision="refs/heads/v1.2.0" name="gaia-shared" path="shared"/>

Cons: Setup equivalent (without repo)

			$ git clone
			$ cd gaia && git checkout -b master origin/gaia-exp style
			$ git clone

Update gaia gits

Update with repo command

			$ repo sync

The repo sync command will recursively fetch and update gits to current versoin.

Cons: Update equivalent (without repo)

			$ git remote update && git merge upstream/master
			$ cd shared/style
			$ (update and merge)
			$ cd shared/style-unstable
			$ (update and merge)

Development Settings

Development Settings

			add git master branch
			$ git checkout --track -b master gaia/gaia-exp
            add b2g upstream repository
			$ git remote add upstream

we need explicitly add a branch before checkin code or push back to github. Since 'repo' checks out the revision on a detached head, which "git branch" reports as "(no branch)"

$ (do whatever you familiar with!)


  1. Bug 883711
  2. How to build your own 'repo' to Manage project with multiple git repositories


Give your opinion on 883711 or dev gaia!