34
page access code
Mark Olesen edited this page 2021-12-17 09:48:19 +01:00

home modules build repos

OpenFOAM repositories are hosted on the develop.openfoam.com site. Many are public-access and can be downloaded or cloned directly; to access other internal repositories and take advantage of advanced features (such as reporting issues), users must create an account.

Repository Issue tracker
OpenFOAM issues
ThirdParty build scripts issues
Additional modules individual
packaging/containers -

[[TOC]]

Organization of git branches

OpenFOAM follows a branching workflow with the following main branches:

Branch name Description
master Bugfix updates since the last release, should always be stable and runnable (suitable for production)
develop Current developments, slated for the next release. The code in develop is generally quite stable, but minor regressions may occasionally occur.
maintenance-v1912 ... Bugfix branches for previous releases, should always be stable and runnable (suitable for production)
feature-XYZ Work-in-progress feature branch (primarily internal use, no guarantees)

Most people will use the master branch to have up-to-date bugfixes of the current release. When a new code version is released, master is renamed maintenance-{prevRelease} and a new master is created at release.

The feature branches (as denoted by their prefix), have no guarantee of being stable and are liable to change at any time. Since they will also occasionally be rebased onto the lastest develop, there is no guarantee of continuity.

Additional Information

Exploring projects

  • From the projects menu you can navigate through various projects as shown below. GitLab All projects

  • Selecting a project, e.g. openfoam or ThirdParty-common, provides further details. Each project has a similar structure; the main OpenFOAM repository is shown below. GitLab OpenFOAM project

  • Options for managing notifications, marking favourites (starred projects), or accessing git clone features are located on the right side of webpage as shown below. See the Cloning section for more information. GitLab notification settings

  • If you are looking for a one-off download for any particular branch (with no git history), browse to the required branch and select from the download options: GitLab download options

  • Alternatively, browse a repository for files, branches, tags, etc. via the Repository section: GitLab repository view

Terminal mode (cloning)

Get a snapshot

  • Cloning allows you to synchronize your local code with the latest developments. The address for cloning is available on the right hand side of Project overview -> Details slider of the repository:

    GitLab clone address

  • Clone the default master branch via HTTPS using

git clone https://develop.openfoam.com/Development/openfoam.git
  • Optional: You may specify a target branch directly using
git clone -b <local branch name> <git url> <name of resulting directory>

e.g. to clone the develop branch to your local OpenFOAM-com directory via HTTPS:

git clone -b develop https://develop.openfoam.com/Development/openfoam.git OpenFOAM-com
git submodule init

The respective modules/README contains more information.

Shallow cloning
  • Shallow cloning is a clone of the last repository state without its entire history. This makes for a smaller repository and faster cloning.
git clone --depth=1 https://develop.openfoam.com/Development/openfoam.git
cd openfoam
git submodule init && git submodule update --depth=1

If you want more than just the very last commit, adjust the clone depth accordingly. For example, to obtain the repository with the last 8 commits:

git clone --depth=8 https://develop.openfoam.com/Development/openfoam.git

Update existing snapshot

  • The repositories are updated regularly to include bug fixes and new features. Retrieve the updates using:
git pull
  • To update the additional community repositories, issue the command:
git submodule update
  • Note: if you experience merge conflicts during the pull due to your own local code changes, you will need to resolve them manually/reset the state of your repository and re-pull

Quite often, it can be useful to monitor changes without actually updating your local files:

git fetch

Registration

  • Go to https://develop.openfoam.com and create a new user account
  • A confirmation email will be sent to the registered address (check the spam folder if no emails are received after a few minutes)
  • Follow the link to complete the sign-up process

GitLab User Registration

Adding a SSH key

If you use SSH for cloning, you can access the related settings of your profile from the top-right of the browser page. Follow the steps numbered in the snapshot to add a key to your profile. You may add multiple SSH keys and distinguish them with proper title.

GitLab Add SSH key


Copyright (C) 2019-2021 OpenCFD Ltd.