User Tools

Site Tools


git-for-lieutenants

This is an old revision of the document!


This page contains an instructions and guidelines for lieutenants. Lieutenants are experianced developpers and maintainers, usually in charge of a specific subsystem of the project and they merge in changes from individual developpers and push to the reference (blessed) repository that everyone then clones from again.

Push access to reference repository

Lieutenants should use SSH protocol to access the reference repository. To grant ssh access, thaay have to send their public ssh key(s) (see http://git-scm.com/book/en/Git-on-the-Server-Generating-Your-SSH-Public-Key for reference).

Lieutenants clone oofem repository using ssh protocol:

  git clone git@www.oofem.org:/data/git/oofem.git

Reference repository

On the reference repository, two main branches exist:

  • master - this branch is stable and should be in a state that allow a release at any time. Please do not merge any changes into this branch.
  • develop - used for development.

Individual developpers typically clone the main repository, create a topic branch, derived from develop branch of the main repository and make their development there. Then they create a patch or patch series they are planning to contribute. Basically, the same procedure is followed by Lieutenants for their own development, except they do not have to send patches to themselfs.

The sequence looks basically like this:

# clone reference repo

$ git clone http://www.oofem.org/git/oofem.git oofem.git
$ cd oofem.git
# track remote develop branch on reference repo; it will became active one
$ git checkout -b develop origin/develop
# create a new brach for a new development
$ git checkout -b featureA
$ (work)
$ git commit
$ (work)
$ git commit

Now you have your commits that you want to send to the maintainers. It is strongly recommended to use rebase -i to squash your work down to a single commit, or rearrange the work in the commits to make the patch easier for the maintainer to review — see Git book for more information about interactive rebasing.

The user use git format-patch to generate the mbox-formatted files.

Applying Patches from E-mail

If you receive a patch over e-mail that you need to integrate into your project, you need to apply the patch in your topic branch to evaluate it.

git-for-lieutenants.1351852447.txt.gz · Last modified: 2012/11/02 11:34 by bp