GeoModeller organizes data into projects. In terms of persistence, a project is stored in the file system as a directory, which includes the project descriptor, plus the persistence of each type of data.

It is possible and recommended to use version control systems to keep track of the changes, a version control systems provide:

  1. Backup and Redundancy;
  2. Revision control and change history tracking using the integrated client or your own third-party client;
  3. Access control;
  4. Data sharing via local or online Git repositories;

Integrated Git Client (EGit)


By default, GeoModeller v4.0 provides an integrated Git client. This article covers the basic configuration steps to activate versioning on an existing GeoModeller project and routine procedures.

However, we suggest you refer to Git's User Guide for more detailed information on repository management.


One-off Git Configuration


If Git software is installed on the computer, there is a high chance the steps in this section are not needed.

  1. Launch GeoModeller;
  2. Press CTRL-3 to bring up Quick Access dialog. Type pref in the box then choose Preferences from the commands list to open Preferences dialog;
  3. In Preferences dialog, expand to Team → Git → Configuration;



If the user has Git installed and configured then the configuration will show up in the table. Check if there are two keys called user → email and user → name.
If not, click on Add Entry... to create two key-value entries, then press OK button to save them;

Key

Value

user.name
(Example) John Doe
user.email
(Example) [email protected]



Capture3.PNG


Setup an existing project for Git

  • Open a project;
  • Switch to Navigator view. The only openned project is the current project. Right click on it then choose Team → Share Project...;Capture5.PNG


  • Select Use or create repository in parent folder of project, single click on the project listed (do not tick the check box) then the gray-out Create Repository button becomes available. Click on it then click on the Finish button.

There is a tiny decorator showed up on the icons for each project file in the navigator.



  • Make the first commit into the repository. Switch to Navigator view, then right click on the project, choose Team → Commit... to open the Git Staging dialog;


  • In the Git Staging dialog, select the files to be traced (or simply press CTRL-A to select all) in the Unstaged Changes list then right click on them, select Add to Index. This will move them into the Staged Changes area.
    The newer version (GeoModeller 4.0.4+) will have several buttons to help move entries around.
    Add some comments to the Commit Message area to help remember the changeset.
    If needed, change the Author / Committer.
    Click on Commit button. Be aware in this guide there is no upstream repository therefore there is no need to Commit and Push....



Committing changes after each Save to the project


An automated commit operation after each Save / Save As is planned for GeoModeller 4.0.6. So the steps listed here will be unnecessary in the near future.


  • Once the project is saved, switch to Navigator view. Right click the project main directory then choose Refresh;


  • If there are any changes to the resources, there will be a '>' beside the resource and their containers. Repeat Step #4 and #5 in the last section to commit the changes.
    New files will show up in the Unstaged Changes area and need to be added to index by hand, modified files will show up straight in the Staged Changes area and no action is needed. Provide a message then click on Commit;



Disabling Git


Disconnect a project from EGit


In this case all the history with the project is still reserved and may be used by other Git tools.

Navigator view, right click an opened project and choose Team → Disconnect from the contextual menu;


Remove all Git history for a project

  1. Disconnect the project from EGit following the steps above;
  2. Right click on the project from Project Explorer, then from the file system, remove the .git directory (hidden).

This will remove the history for one clone of the project. If there are multiple clones and up-streams, this operation needs to be applied to all.


Online Git Repositories


Refer to the documentation specific to your repositories on how to setup an online repository from an existing local project.


Third-party Git Client


Please refer to the tool's user manual.