Skip to main content
Version: 🚧 Alpha 🚧

Using Git with GAMA

A GAMA model and its project resources are files in the local file system. Git can track those files so that you can review changes, keep history, work on branches and share the project with others.

You can manage a GAMA project with a Git client of your choice. EGit integrates Git with the Eclipse workbench used by GAMA. If Git views or project actions are unavailable in your GAMA installation, install a version of Git Integration for Eclipse that is compatible with that installation. See the Eclipse installation guide and the EGit User Guide.

Put a GAMA project under version control​

Create or clone a Git repository in a folder that contains the GAMA project. A repository tracks changes across its working tree, which can contain one or more projects. When cloning a repository, import the GAMA project from the cloned working tree into the GAMA workspace so that it appears in the Models view.

Before committing, review the changed files and stage only the files that belong in the commit. A commit records a snapshot of the staged changes in the repository history. Add a .gitignore file when the project contains files that should remain local and untracked.

Work with branches and remote repositories​

Use a branch to keep a line of work separate from another branch. To share work, configure a remote repository, then fetch its updates and integrate them with the current branch. Pull combines fetching and integration according to the branch configuration; push sends local commits to the remote repository.

If changes conflict during integration, resolve the affected files and review the result before creating a commit. Compare a file with an earlier revision to restore selected changes. A reset can replace local repository state, so review the files and the selected target before using it.

EGit provides views and actions for repository status, staging, commits, branches, remotes, history and comparisons. Its task guide describes the current interface and workflows.