Git: Difference between revisions

From OLPC
Jump to navigation Jump to search
mNo edit summary
(slight update)
Line 3: Line 3:
= Git Commands =
= Git Commands =


To get a project's code for the first time, use "git clone" :
git-clone git://dev.laptop.org/<project-directory> (To get the code)
git-clone git://dev.laptop.org/<project-directory> (To get the code)

For instance:
git-clone git://dev.laptop.org/activities/epals
OR
git clone git://dev.laptop.org/activities/epals
You can update the code as follows:
git-pull (To update the code)
git-pull (To update the code)
git-status -a (To see the status of your commits)
git-status -a (To see the status of your commits)
Line 12: Line 20:
git-clone git://dev.laptop.org/sugar
git-clone git://dev.laptop.org/sugar



----
== Git for OLPC ==
== Git for OLPC ==
To get a project of yours hosted in our Git instance, '''see [[Project hosting]]'''.
To get a project of yours hosted in our Git instance, '''see [[Project hosting]]'''.

Revision as of 19:47, 29 January 2008

Git is a version control ("revision control") system for programmers used to track and manage changes to code. It happens to be a decentralized system, with no "master" tree, and was originally written by Linus Torvalds to manage the Linux kernel sources.

Git Commands

To get a project's code for the first time, use "git clone" :

git-clone git://dev.laptop.org/<project-directory> (To get the code)

For instance:

git-clone git://dev.laptop.org/activities/epals 
    OR 
git clone git://dev.laptop.org/activities/epals 

You can update the code as follows:

git-pull (To update the code)
git-status -a  (To see the status of your commits)
git-checkout -- (To undo your commits)
git checkout HEAD -- filename (To replace filename with the one at HEAD)

For example, to clone the Sugar repository:

git-clone git://dev.laptop.org/sugar


Git for OLPC

To get a project of yours hosted in our Git instance, see Project hosting.

OLPC GIT: http://dev.laptop.org/  (for tracking and submitting bugs and tasks)

    Wiki: http://dev.laptop.org/wiki
 Roadmap: http://dev.laptop.org/roadmap
 Sources: http://dev.laptop.org/browser
 Tickets: http://dev.laptop.org/query

Further Resources