Using a central git tree


Jump to: navigation, search

See importing your project if you're importing a new project to the OLPC servers -- because 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.


Identify yourself

Tell git who you are:

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

This is used in commit messages. You only ever need to do this once per each machine on which you do development.

Clone the central tree

Using a git over ssh, if you have an account on,

$ git clone git+ssh://

or if you have no account,

$ git clone git://

You only ever need to do this once per each machine on which you do development.

Hack on the code

Pretty self-explanatory, we'd hope.

Do local commits

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

$ git commit -a

This will ask for a commit message using a text editor. You may add -m "Commit message" to specify it on the command line. Use -s to add the Signed-off-by line commonly used in Linux kernel development.

Push commits upstream

$ git push

If someone else has updated the tree since you last pulled from it, and git cannot resolve the changes easily, git will complain. In this case, do a git pull --rebase, and then repeat the push.

Pull upstream commits

This brings to your machine the changes made by others. It is the CVS equivalent of update:

$ git pull

See also

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