Multiple branches with git?

Wolf, Josef josef.wolf at siemens.com
Wed Dec 17 13:52:40 UTC 2008


Hello,

I am wondering how to check out multiple branches of OE concurrently.
With
monotone, this was pretty straight-forward: I downloaded the database
and then
simply checked out the desired branches into separate working copies.

With git, I got somewhat lost, because git does not have the concept of
a
working copy.  Currently, I see two ways to get two branches at the same
time:

1. for every branch, clone from the official openembedded repository:

     git clone http://repo.or.cz/openembedded.git stable
     git clone http://repo.or.cz/openembedded.git dev
     (cd stable && git checkout -b org.openembedded.stable
origin/org.openembedded.stable)
     (cd dev    && git checkout -b org.openembedded.dev
origin/org.openembedded.dev)

   But this has the disadvantage that everything is transferred multiple
times
   over the network.

2. make one clone from the official repository and then clone from this
clone locally

     git clone http://repo.or.cz/openembedded.git org.openembedded
     git clone org.openembedded stable
     git clone org.openembedded dev
     (cd stable && git checkout -b org.openembedded.stable
origin/org.openembedded.stable)
     (cd dev    && git checkout -b org.openembedded.dev
origin/org.openembedded.dev)

   I guess this has also the advantage of making it easier to push my
modifications
   between those working copies.

What would you gurus out there recommend?




More information about the Openembedded-users mailing list