Skip to content

branching

gaiaops edited this page Oct 24, 2011 · 2 revisions

Branching: summary

The repo has been refactored to allow you to pull in only the specific libraries you need for the application. It should make it easier for you to understand the dependencies. All of the libraries are compatible with each other, but some may have no relation to your own project. You can get only the code you need and be sure that what you checked out has all the dependencies it needs.

First time checkout

follow these commands:

git clone http://[email protected]/gaiaops/gaia_core_php.git
cd gaia_core_php
./branch/checkout.sh
git submodule init
git submodule update

This will give you the gaia code repo with all of the branches in it and the vendor branches. Master has all of the branches merged into it.

Seeing all the branches

Run the following command:

git branch

It will list all the branches checked out in your local repo based off of origin.

The bare minimum

If you want to see the bare scaffolding with no code libraries at all, do:

git checkout framework

This will switch to the framework branch. It has the test class and a few directories in it, but not much else. Let's use this is as our starting point.

Creating our own branch

To create your own combination of libraries, we create a new branch based off of framework:

git checkout framework
git checkout -b myproject

Now that we have the branch set up, we can pull in the branches we need. In this example, I will pull store, and db:

touch branches/dependencies/store
touch branches/dependencies/db
git add branches/dependencies/
git commit -m 'adding dependencies for myproject'

Now that I have my dependencies listed and committed, I can run the merge command which will pull in changes from those branches.

./branches/merge.sh

#Updating the branches As time goes on, I will need to pull from origin and merge all of the changes into the branches. you can run the following command:

./branches/manage.sh

It will cycle through each branch and check it out then pull in the changes from origin into the appropriate branch, keeping you up-to-date so you can continue running the ./branches/merge.sh command.

Clone this wiki locally