Differences between revisions 1 and 2
Revision 1 as of 2010-01-15 15:41:04
Size: 3894
Comment:
Revision 2 as of 2010-01-15 15:42:14
Size: 3923
Comment:
Deletions are marked like this. Additions are marked like this.
Line 55: Line 55:
 * when the developer is happy with the modifications he made, he pushes them on his public individual repository on Kirikou server (using "git push"), and sends an email to one of the integrators  * when the developer is happy with the modifications he made, he pushes them on his public individual repository on Kirikou server (using "git push"), and sends an email to one of the integrators (or to the dev mailing list)

We are going to migrate the current Subversion (SVN) repository to another source control management (SCM) software, called Git. Migration is scheduled for January 29th, 2010.

The oustanding differences between Git and SVN are:

  • Git is a decentralized SCM software: Git support an arbitrary number of repositories for a given project, and has powerful to synchronize and merge between these repositories
  • Branching and merging is very easy in Git
  • Every local working copy contains a full repository with all the history of the project: in particular, this allows user to make commits or to examine history on their local private repository when they are offline; they will later "push" their commits to a public repository when they come back online
  • In Git, a revision is a photography of a full directory tree; on the contrary, in SVN, revisions are attached to individual files, not to sets of files
  • The internal representation of history in Git is a directed acyclic graph (DAG): the creation of a branch occurs when a given commit has two children commit; conversely, a merge is represented by a commit which has two parents
  • Git is much faster than SVN

Installing Git

On Debian and Ubuntu, just install the "git-core" package; you may also be interested in the "git-doc" package.

On Windows, there are two possibilities:

  • Using Cygwin: install the "git" package

  • Using TortoiseGit: however note that all Git documentation is given using the command line version of Git

Learning about Git

You can look at the documentation available in the documentation section of the Git website.

Start reading the tutorial. Also read Git for computer scientists which explains how Git internally stores data and history: this makes the understanding of commands much more easier (in particular for branching/merging).

Quick start for Dynare users

For users who want to track daily development of Dynare, only two commands are needed (very much like with Subversion).

Initial setup:

git clone http://www.dynare.org/git/dynare.git

(equivalent of SVN checkout)

This will store Dynare source code in directory dynare.git. For regular updates, go into that directory and type:

git pull

(equivalent of SVN update)

For Dynare developers

We will adopt a decentralized architecture.

Of course, there will still be a central public repository.

But along with that, each developer will have his own public repository on the Kirikou server, on which he will push his modifications.

Once these modifications are ready to be integrated in the official central repository (possibly after review by another developer), they will be integrated in the central repository by an integrator (Michel, Stéphane or Sébastien).

To be more concrete, the workflow for a developer is the following:

  • the developer downloads Dynare source from the central repository (using "git clone")
  • the developer makes modifications and commits them on his local private repository (using his favourite editor)
  • on a regular basis, since the central repository changes, the developer needs to merge those changes with his local copy (using "git pull")
  • when the developer is happy with the modifications he made, he pushes them on his public individual repository on Kirikou server (using "git push"), and sends an email to one of the integrators (or to the dev mailing list)
  • the integrator downloads the changes from the developer's public repository into his local private repository
  • after validation, the integrator pushes the changes to the central repository

DynareWiki: GitHowto (last edited 2015-09-14 08:48:29 by JohannesPfeifer)