[Olsr-dev] Some words on GIT

Henning Rogge (spam-protected)
Sun Nov 22 17:39:39 CET 2009

Hello everyone,

as I promised I have written some line about GIT. I assume that most of you 
know how source code management software can be used, if not you will find a 
lot of stuff about it at http://git-scm.com/ .

Especially the following links might be interesting or useful for getting some 
basic information about git:

If you want to work with the OLSRd on windows, you might want to look at this 
URL: http://code.google.com/p/msysgit/downloads/list

On all operation systems (supporting QT, so there is a windows version too), I 
suppose you test the GIT repository viewer QGIT:


The main difference between our new GIT repository and the old mercurial one 
is, that both stable and development code are within the SAME repository. This 
means that it is easy to transfer changes from one branch to another one.

The development is done in the "master" branch, the most current stable code 
is in the "stable" branch. There might be other branches in the repository 
which contain code still in development before it get's merged back into 
stable or master

To get a copy of the olsr.org GIT repository use
> git clone git://olsr.org/olsrd.git -b <branchname>
> git clone http://olsr.org/olsrd.git -b <branchname>
The git:// variant does not work through some firewalls, but it much faster 

The "-b <branchname>" option automatically creates a local branchs that 
"tracks" the foreign branch at olsr.org

You can see a list of your local branches with "git branch", to see the 
foreign ones use "git branch -r".

To see a list of tags (named commits) use "git tag".

To see the history of commits, use "git log".

If you want to get another foreign branch as a local branch use
> git checkout --track -b <localbranch> <foreignbranch>

For example to get a 'stable' branch after you cloned your repository with the 
master branch, use
> git checkout --track -b stable origin/stable

To change your current repository to a certain commit use 
> git checkout <commit>
<commit> can be a hexadecimal GIT id, a branch name or a tag.

Henning Rogge
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.olsr.org/pipermail/olsr-dev/attachments/20091122/8db64a33/attachment.sig>

More information about the Olsr-dev mailing list