Using a central git tree


Revision as of 23:53, 11 October 2008 by (Talk)
Jump to: navigation, search
NB: this was originally copied from an original at; we are moving away from using that wiki; please make this the latest version in the future.

Note: See importing your project if you're importing a new project to the OLPC servers-- you'll have to do a few extra things before you can get up and running.

If you're familiar with centralized systems like CVS or SVN, this will be just learning a bit of new syntax.


1. Clone the central tree to your local machine

$ git clone git+ssh://


$ git clone git://

You only ever need to do this once per each machine on which you do development. The same goes for telling git who you are:

$ git config "FirstName LastName"
$ git config ""

2. Hack on the code

Pretty self-explanatory, we'd hope.

3. Do local commits

Use 'git add <file>' to add files to versioning. Delete files from the tree directly if you want them removed, or use 'git rm <file>'. Commit with:

$ git commit -a

This will prompt for a commit message. You may add '-m "Commit message"' to specify it on the command line. Using -s will also add the Signed-off-by line commonly used in Linux development.

4. Push commits upstream

$ git push

If someone else has updated the tree since you last pulled from it, git will complain. In this case, do step 5, and then return to this one.

5. Pull upstream commits

This is the equivalent of 'cvs update':

$ git pull


This is just a summary. For detailed help, see:

Personal tools
  • Log in
  • Login with OpenID
About OLPC
About the laptop
About the tablet
OLPC wiki