Get the source code

Attribution

The content of this page is largely taken from the GitHub-blog.

Create a fork

Go to the official OGS-6 repository and click the “Fork”-button. This creates a new fork under your account with the URL https://github.com/YOUR-USERNAME/ogs.

Setup your local clone

You can use the git command line tool to clone the remote repository on GitHub to your PC:

Note: We use git lfs clone instead of the regular git clone to significantly speed up the cloning of the repo and its test data files. See this for more information.

This creates a new folder ogs in your current working directory with the OGS source code. After this step, the remote called origin refers to your fork on GitHub. It also sets the default remote for pushes to be origin and the default push behavior to current. Together this means that if you just type git push, the current branch is pushed to the origin remote (git version >= 2.5 required).

Create a second remote called upstream that points at the main OGS repository and fetch from it:

Optional: Working on a new feature

You only have to follow the above steps once. From then on, whenever you want to work on a new feature, you can more easily interact with the remote repositories.

Make sure that your local repository is up-to-date with the upstream repository:

Create a branch feature-name off of upstream master-branch to work on a new feature, and check out the branch:

This automatically sets up your local new-feature-branch to track the upstream master-branch. This means that if more commits are added to master upstream, you can merge those commits into your feature-branch by typing

or rebase your branch on top of the new master by typing

Now after you implemented the feature and committed your work you can push the new commits to the feature-name-branch on your GitHub fork:

If your work is done submit a pull request.

This workflow is summarized with this picture:


This article was written by Lars Bilke. If you are missing something or you find an error please let us know. Generated with Hugo 0.47.1. Last revision: February 23, 2018
Commit: [web] Finished devguide/getting-started. 26d5293f9  | Edit this page on

Creative Commons License | Privacy policy / Legal statements / Impressum