Views

Git

Share |

Jajuk leverages Git SCM since jan 2011. This page centralizes information dealing with developing Jajuk with Git.

Contents

Documentation

Git is very powerful and innovative but also very different from Subversion we used previously and is also more complex. We assume that you understand basic concepts of Git. If it is not the case, please read first (by preference order) :

Public Git Repository

The Git URL for clone/push is

 ssh://git@gitorious.org:22/jajuk/jajuk.git 

Git and Eclipse

Most Jajuk developers currently use Eclipse (but it is not mandatory) and Jajuk is Eclipse-ready (.project and .classpath Eclipse configuration files are provided out of the box). For now, Eclipse project owns a single Open source Git Team plugin : eGIT/jGit (eGit is the Eclipse plugin and jGit is the pure Java Git implementation).

Install eGit/jGit (We advice the bleeding edges builds)

Note that eGit is still a young project (0.10 release is the first actually usable in production) but grows rapidly[1].

eGit doesn't implement every git features and is a bit unstable so we advice for now to install the C command-line Git implementation in addition to eGit even if eGit if may be enough for a basic git usage. Note that we also successfully used Linux C-command line under Windows using Cygwin (install git and openssl packages).

  1. Eclipse project itself decided in 2010 to move to Git so most Eclipse projects will rely soon upon eGit and jGit

Branching workflow

Branching workflow (CC-BY-SA Vincent Driessen)
Branching workflow (CC-BY-SA Vincent Driessen)
  • We use this worflow, please make sure to read it carefully. To sum up :
    • The master branch (default git branch) is only for released code and is the most stable code around. Only the integrator should commit to this branch. Make sure to checkout develop branch (see below) before starting to work.
    • The develop branch is a permanent branch and is the project mainstream. CI is done against this branch. You should work or merge your changes to this branch.
    • A release-x.y branch is created during a release stabilization (few weeks before release) and is kept for maintenance until the release is no more supported.
    • Topic or hotfix branches for temporary work are encouraged and should be merged into the develop branch. These branches are local only, please don't push them into the Gitorious repository, except if they are some kind of test to unforeseeable future integration.
  • Make sure to create a topic branch for every fix or new feature, this makes merges easier.
  • Rebasing is encouraged to preserve history from rebased branch. However, please don't rebase commits already pushed to Glitorius[2].
  • A git-flow super-command is available, we advice its use, see also this screencast.
  1. Eclipse project itself decided in 2010 to move to Git so most Eclipse projects will rely soon upon eGit and jGit
  2. See http://progit.org/book/ch3-6.html

Social coding

We use Gitorious[3] as public Git repository and social coding tool.

The most prominent features brought by Gitorious to our project are :

  • Git public repository (technically, it is a regular Git repository but is our reference)
  • Allows to easily comment the commits (one can add comments directly into the code from a web interface)
  • Allows easy forking : non members are encouraged to fork Jajuk (done in a single click in Glitorious !) and to push "Merge proposals" afterwards that the Jajuk members can integrate easily.

Gitorious repositories interactions are summed up bellow

Image:jajuk_gitorious.png

  1. Eclipse project itself decided in 2010 to move to Git so most Eclipse projects will rely soon upon eGit and jGit
  2. See http://progit.org/book/ch3-6.html
  3. Note that Gitorious is similar to the better known GitHub but not a clone (they have been released the same week) and current versions propose similar features. Gitorious has the huge advantage of being itself an Open Source project, it is why we chose it.