1

repo is a tool that manages download of android source code from github.

To download a branch (say b1) source code, we do,,

repo init -u url -b b1

I want to download multiple branches (gingerbread, ics, jb, kk) source code into the same directory. Is it possible?

1
  • If you do that wouldn't you have duplicate files and thus conflicts?
    – Ramhound
    Commented Feb 24, 2015 at 16:29

2 Answers 2

0

Once you use repo to initialize your local copy of the code for a single branch you should be able to use normal git commands to obtain the other branches.

  • git remote -v will list the remote branches available to you.
  • git fetch will download the remotes
  • git checkout <name> will checkout the branch using the short name and switch your working copy to that branch.

git-fetch docs

git-remote docs

git-checkout docs

0

If the URL for all branches is same, then it is possible.

Basically you need to repo init without the URL option on initializing subsequent branches in the same working folder.

repo init -u URL -b branch1
repo sync
repo init -b branch2
repo sync
repo init -b branch3
repo sync

This downloads all branches to the same .repo folder in the working directory.

See my answer here.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .