Difference between revisions of "Developer Area/Getting Code from Git"

From Mahara Wiki
Jump to navigation Jump to search
(Moved "Setting up gerrit" to Developer Area/Pushing Git Commits)
Line 9: Line 9:
 
  git clone git://gitorious.org/mahara/mahara.git
 
  git clone git://gitorious.org/mahara/mahara.git
 
   cd mahara/
 
   cd mahara/
   git checkout -b 1.2_STABLE origin/1.2_STABLE
+
   git checkout -b 1.3_STABLE origin/1.3_STABLE
  
 
Once you've got the code from git, you should point your webserver at the htdocs directory if you want to run it.  You can update the code by running the "git pull" command from anywhere inside your checkout.
 
Once you've got the code from git, you should point your webserver at the htdocs directory if you want to run it.  You can update the code by running the "git pull" command from anywhere inside your checkout.
  
== Setting up Gerrit in your local Mahara repository ==
+
== Submitting the code for review ==
  
First of all you need to add a new gerrit remote to your repo (substitute username with the one you have chosen at the step above):
+
If you have developed a useful feature or fixed the bug, you may contribute it to Mahara by [[Developer_Area/Pushing_Git_Commits|submitting your code for revision]].
 
 
git remote add gerrit ssh://'''username'''@reviews.mahara.org:29418/mahara
 
 
 
Apparently, '''the username is case-sensitive''', which is why we recommend using a lowercase one.
 
 
 
Also you will need to add a commit message hook to your repo, this will generate <tt>Change-Id:</tt> tags in commit messages which is required for proper gerrit functioning:
 
 
 
scp -p -P 29418 '''username'''@reviews.mahara.org:hooks/commit-msg .git/hooks/
 
 
 
== Submitting commits for review ==
 
 
 
Once you have made changes and wish to send them for consideration, you can [[Developer_Area/Pushing_Git_Commits|submit them for review]].
 
 
 
== Useful links ==
 
 
 
* [https://reviews.mahara.org/Documentation/index.html Gerrit official documentation] 
 
* [http://www.itk.org/Wiki/ITK/Gerrit/ReviewPrimer Gerrit Review Primer] - useful for getting familiar with review interface.
 
  
 
[[Category:Developer Area]]
 
[[Category:Developer Area]]

Revision as of 09:15, 25 May 2011

First steps

Rather than using a standard release build of Mahara, you can check out the code from our git repository.

git clone git://gitorious.org/mahara/mahara.git    

If you check the project out from git, you have the option of checking out a specific feature branch of Mahara, if you're interested in one in particular. See http://gitorious.org/mahara/mahara for a list of all branches in our git repository. Example:

git clone git://gitorious.org/mahara/mahara.git
 cd mahara/
 git checkout -b 1.3_STABLE origin/1.3_STABLE

Once you've got the code from git, you should point your webserver at the htdocs directory if you want to run it.  You can update the code by running the "git pull" command from anywhere inside your checkout.

Submitting the code for review

If you have developed a useful feature or fixed the bug, you may contribute it to Mahara by submitting your code for revision.