Commit e13c0a13 authored by Felix Dietrich's avatar Felix Dietrich Committed by Felix Dietrich

Initial commit: Vadere master

parent 540e4f17
#builds, log/preferences files
#package specific
  • I fixed the problem. The application will no longer crash if there is no current_commit_hash.txt, instead an error will be logged. I also updated the paths used in the hook files. The user has to copy the hook files into the .git directory. Note that all hooks and the scrip file contained in Documentation/version_control have to be executable. I additionally add a JUnit test that fails if there is no current_commit_hash.txt. All these changes are currently in the develop-branch.

Please register or sign in to reply
#model test output
VadereModelTests/TestOSM/processed output/*
VadereModelTests/TestSFM/processed output/*
VadereModelTests/TestGNM/processed output/*
VadereModelTests/TestOVM/processed output/*
#deprecated: can potentially be removed
Contribution guidelines
Coding style guide
Basic rules:
- No warnings
- No unused imports
- Use the formatting tool!
- Eclipse: select text (optional) and press <kbd>ctrl</kbd> + <kbd>shift</kbd> + <kbd>f</kbd>
- IntelliJ: select text (optional) and <kbd>ctrl</kbd> + <kbd>alt</kbd> + <kbd>l</kbd>
For source code formatting, we use an adapted version of
[Google's Coding style guide](
Please check the [README in this repository](/vadere/styleguide)
for the style guide and for how to import the style settings into your IDE.
Commit style guide
These are examples for a good commit messages:
Fix typo in introduction to user guide
Refactor model initialization
Extracting a new class ModelBuilder because this functionality might be
used in multiple places.
1. Separate subject from body with a blank line
2. Limit the subject line to 50 characters
3. Capitalize the subject line
4. Do not end the subject line with a period
5. Use the imperative mood in the subject line
6. Wrap the body at 72 characters
7. Use the body to explain what and why vs. how
This article lists good reasons for each rule!
Reasons include:
- Clean and consistent git-log that also fits in the GitLab user interface
- Stick to Git standards, e.g. "Merge branch ..." and "Revert ..."
Rules 1, 3, and 4 never hurt and should always be applied.
This document describes our workflows with Git.
## Excursus: Fundamentals of Git remotes
Like we can have multiple branches, we can also have multiple remotes.
Remotes are other repositories we are synchronizing with.
You are probably already familiar with remotes:
When you clone a repository, you have this repository as a remote.
By convention, it is called `origin`.
We use remotes to work with the public and the private VADERE repositories from
only *one* local repository.
Source: Scott Chacon and Ben Straub: [Pro Git](,
specifically [Working with
Remotes in chapter 2](
## Repository setup
Our repositories are set up as follows:
1. A public repository `vadere`.
2. A private repository `vadere-private`.
The public repository contains these branches:
1. `master` for the current stable release.
2. `develop` for current development.
3. `dev/*` or `lastname/*` branches.
For new releases, `develop` is merged into `master`.
The private repository contains only branches that must be private, e.g. a new
simulation model under development. It does not contain copies of any branches
of the public repository because this leads to a synchronization overhead.
Important: Both remote repositories are managed from one single local
repository using remotes. For details, see the workflows below.
The URLs for public and private repositories are:
## Workflows
### Getting started & public contribution
For standard development and bugfixes, you can follow this workflow.
git clone <url-of-public-repo>
cd vadere
git checkout develop
git checkout -b dev/my-feature
With this commands, you
1. make your initial clone of the public repository.
2. checkout the development branch on which we are working.
(The `master` branch is reserved for stable releases.)
3. checkout a new branch (based on `develop`) to work on a new feature.
(Note that the feature branch should start with `dev/` but cannot start with `develop/`.)
After you finished the new feature, go to GitLab, view your feature branch and create a pull/merge request.
The target branch must be `develop`, not `master`.
![Screenshout of GitLab merge request creation (1)](gitlab-merge-request.png)
![Screenshout of GitLab merge request creation (2)](gitlab-merge-request-create.png)
### Working on a private branch
To work on a private project, you can follow this workflow.
If not already done,
1. clone the public repository (see above).
2. add the private repository as a remote: `git remote add private <url-of-private-repo>`
Now proceed with:
git checkout master
git checkout -b my-model
git push -u private my-model
With this commands, you
1. checkout the current release.
2. checkout a new branch (based on `master`) to work on e.g. a new model.
3. push your new branch to the private repository.
From now, you can synchronize your private branch with `git pull` and `git
push` with the private repository.
### Working together on a private branch
To work together on a private branch, you can follow this workflow.
Precondition: One person has set up a private branch (see previous section).
First, the co-worker has to do this steps (described in the previous section):
1. Clone the public repository.
2. Add the private repository as a remote.
Now, the co-worker proceeds with:
git fetch --all
git checkout private/my-model
git checkout -b my-model
git push -u private my-model
With this commands, you
1. fetch the latest state of all repositories.
2. checkout the existing private branch of the remote `private`.
3. checkout your "working branch" with the same name but without the `private/` prefix.
4. initially push and register the branch.
From now, you can commit changes into this branch and synchronize with the
private repository using `git pull` and `git push`.
### Rebasing to avoid unnecessary merge commits
You may want to update your local branch you are currently working on and get
the latest changes of `master` or `develop`.
To avoid unnecessary merge commits you should prefer
[rebasing]( over merging.
Automatic merging happens when you do `git pull` and there are new commits
locally *and* remotely.
In this case it is usually better to do `git pull --rebase`. This applies your
local commits on top of the remote's commits.
Please configure Git to avoid merges on `git pull`:
# cd into your vadere repository, then
git config pull.ff only
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <>