Getting STAFSEA² from GitLab

the STructured Adaptive Flow Solver for Engineering and Atmospheric Applications

Here you will learn how you can get access to STAFSEA² and how to download the source code. This project is still closed from public, but you can write an email to or another active member of the developer team and ask for access to the project.

GitLab at FU Berlin

Check the department's GitLab documentation for an introduction to GitLab (in German). For git commands beyond the ones listed below see the nice detailed git tutorial.

Getting the Source Code via HTTPS (simple)

The STAFSEA² repository is stored as a project in the local GitLab of the computer science department. You can ask one of the current developers to get access to the repository, login with your ZEDAT account name and password and get the sources easily via HTTPS. Once you got all permissions needed, open a terminal and type:

$ git clone

This will ask for your ZEDAT username and password and when successfully authenticated it will create a directory named stafseasquared containing the current repository. This method of getting the sources is easy but it has drawbacks for active developers. Every online interaction with the repository will require you to type in your ZEDAT login. The following method will use ssh and your ssh key as authentication method. So it is recommended to use this one instead, if you plan to work with the repository more frequently.

Getting the Source Code via SSH (developer)

For this method you will need a ssh key. If you have to create one, you might check this tutorial. If the public key is available, keep it ready as you need to register it at the website of GitLab. The following pictures illustrate how to do that:

  • how to add ssh keys in GitLab:

  • where to add your public key (called id_rsa*.pub* in the tutorial)

After registering your ssh key you can clone the repository with ssh:

$ git clone

If a local keychain tool is available, you need to type your password once only.

Some Git Basics

Once the git repository stafseasquared.git is obtained as described above, the locally available branches can be listed via

$ git branch

from within the local repository folder stafseasquared or any of its sub-directories and

$ git branch --all

lists all available branches, including the ones which are not (yet) locally available. The graphical overview might help to understand the relations between the different branches. One can switch between these branches via

$ git checkout <branchName>

which loads the branch content from the local (if already available) or the remote repository and, thus, changes the content of the local stafseasquared working directory. These switches are only possible, if local changes of the current branch are either discarded or already submitted to the local repository. The command

$ git commit

stores these changes in the local repository, from which they are loaded via the checkout command again. Submission/extraction of the current branch to/from the remote repository is done using the commands

$ git push

for submission and

$ git pull

for extraction. A new locally created branch can be submitted to the global repository via

$ git push origin <branchName>

and a branch which is not yet available locally but existing in the global repository can be obtained via

$ git pull origin <branchName>

The command

$ git status

lists the properties of the current branch and indicates potentially necessary actions.

A hidden file .gitignore is recommended to be created in the branch main directory stafseasquared containing information on which files to exclude from version control. The content of this file can, for example, look as follows:


Next to .gitignore itself, a file .gitignore with the content listed above excludes all files with extension .cpp, .hpp, .dat, .inf, .log and .o as well as computational data, the STAFSEA² executable and hidden files from version control. Note, that STAFSEA² source files have file extensions .C and .h, so source code which should not be under version control can be given the extensions .cpp and .hpp



Topic revision: r14 - 27 Mar 2017, waidmann
  • Printable version of this topic (p) Printable version of this topic (p)