Setting up GISMO for development - geoscience-community-codes/GISMO GitHub Wiki

I describe here the way I use git to develop GISMO.

Directory structure

My directory setup is to create a directory like /home/glenn/src/ and then within the src/ directory, create the following:

GISMO/           
GISMO.website/   - 
GISMO.wiki/      - used for modifying to GISMO wiki [https://github.com/geoscience-community-codes/GISMO/wiki] (rarely: I mostly edit it directly online).

What are these?

  • GISMO: - used for modifying the GISMO code base [https://github.com/geoscience-community-codes/GISMO]
  • GISMO.website: - used for modifying the GISMO website [http://geoscience-community-codes.github.io/GISMO]
  • GISMO.wiki: - used for modifying to GISMO wiki [https://github.com/geoscience-community-codes/GISMO/wiki] (rarely: I mostly edit it directly online).

Setting it up

Assuming you are in your src/ directory, the following commands are needed:

Clone GISMO repository, checkout develop branch:

git clone https://github.com/geoscience-community-codes/GISMO.git GISMO
cd GISMO
git checkout develop
cd ..

Clone the GISMO wiki repository:

git clone https://github.com/geoscience-community-codes/GISMO.wiki.git GISMO.wiki

Clone the GISMO repository, checkout the gh-pages branch:

git clone https://github.com/geoscience-community-codes/GISMO GISMO.website 
cd GISMO.website 
git checkout gh-pages
cd ..

You can see that the GISMO.website repository is actually just the GISMO repository, but checked-out to the gh-pages branch. The GISMO.wiki repository is a separate repository stored at a different address by github.

Code repository, working with branches

master
develop
feature-*
release-*
hotfix-*

In GISMO/, I work on the develop branch, though usually only by branching off it and merging back onto it. I rarely modify develop directly. And I never modify the master branch directly. The master branch should only contain releases (like X.y.z, e.g. 1.2.1).

New features

To add a new feature (new capability) I branch off develop by creating a new branch with a name like feature-* (e.g. feature-add-winston-support). If other changes are made to develop while the feature is being developed, they might be merged into the feature branch. When the feature branch is complete and tested, it is merged back into develop. It never gets merged into master, because it is not a release.

New releases

Creating a new release works in a similar way. I branch off develop by creating a new branch with a name like release-X.y.z-alpha. Once this seems reasonably complete and somewhat tested, it is renamed release-X.y.z-beta. (e.g. feature-add-winston-support). When the release is complete and tested, it is tagged, and then merged into master. The develop branch is then updated from master.

Testing code