Git repositories infrastructure
-------------------------------

Master repositories (ines.ro)
-----------------------------

git://lisa.ines.ro/lisa.git
git://lisa.ines.ro/linux-2.6.git

Mirror repositories (cs.pub.ro)
-------------------------------
git://ixlabs.cs.pub.ro/lisa.git
git://ixlabs.cs.pub.ro/linux-2.6.git

Steps to create your own git mirror of LiSA:
--------------------------------------------

cd /path/to/git-root (can be anywhare you like, for example /var/lib/git)

mkdir lisa.git
cd lisa.git
git init --bare	--shared

Edit config and add the section:

[remote "origin"]
        url = git://lisa.ines.ro/lisa.git
	fetch = +refs/heads/*:refs/heads/*

git remote update

Run daily or weekly a script that executes git remote update in the bare repositories
dirs.

The steps are identical for linux-2.6.git mirror.

git daemon configuration
------------------------

service git
{
        disable = no
        bind = <your-ip-address> 
        port = 9418
        socket_type = stream
        protocol = tcp
        user = git 
        group = git 
        server = /usr/bin/git-daemon
        server_args = --inetd --export-all --base-path=/var/lib/git
        type = UNLISTED
        wait = no
        max_load = 5
        instances = 5
}

The git group may be used to manage write permissions on /var/lib/git/lisa.git. All users
that need to push shall be added to the git group and appropriate permissions shall be
set on the /var/lib/git/lisa.git (drwxrwsr-x+)

Working with git
----------------

1. Git global configuration variables.

git config --global user.name 'Your Name'
git config --global user.email 'your.email@yourispdomain'

git config --global color.diff auto
git config --global color.status auto
git config --global color.branch auto

2. Cloning lisa from the git mirror hosted in cs.pub.ro:

git clone git://ixlabs.cs.pub.ro/lisa.git
git submodule init

Edit .git/config and set the submodule linux-2.6 to point to the mirror's url: 

[submodule "linux-2.6"]
	url = git://ixlabs.cs.pub.ro/linux-2.6.git

git submodule update
cd linux-2.6
git checkout -b lisa-devel origin/lisa-devel

Compile your kernel here with lisa support. It's recommended for the development phase to have
lisa compiled as a module.

3. Working with your local git repository:

As an example let's assume you're developing code on the user space part of lisa. In lisa.git we're commiting
on the master branch and you'll want to keep in sync with it.

You'll split a branch from the current master branch for your development:

git checkout -b your_branch origin/master

your_branch can be named however you want (for example by suggesting the feature name: lisa-stp, lisa-igmp etc).

You'll be doing work on this branch, but from time to time you'll need to sync with the master branch. 
For example, let's say that the master branch evolved with 3 commits from where you split your branch:

o origin/master
|
o           o your_branch
|           |
o           o
|          /
o---------/

in order to sync you can either do a merge or a rebase. We recommend the rebase since the history will look
much prettier [1]:

git remote update
git rebase origin/master

Fix conflicts, make everything compile again, run tests etc.

After this your branch will look like this:

o your_branch
|
o
|
o origin/master
|
o
|
o
|
o

Whenever you feel you have something you want to put up for review you need to push your branch into the
repository where you've cloned from (cs.pub.ro mirror):

git push ssh://user@ixlabs.cs.pub.ro/var/lib/git/lisa.git your_branch

It's important that your_branch doesn't exist in the main lisa.git because otherwise it would be overwritten by
the mirroring process.

[1] - Use 'gitk --all' to visualize the history of your repository.

 
git_infra.txt · Last modified: 2009/04/15 15:13 by andrei
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki