As of December 2019, the OpenFOAM repository is available as
openfoam, with an older version available as
The repository change does not reflect functional alterations in the
code, but rather git-related maintenance and structural changes.
The time-line for the repository revamping was triggered by external
circumstances - one of which being the inordinately long times
required to clone the repository when packaging from sources.
With the repository updates, its size has been shrunk by 80% and is
now currently around 200-210 MB instead of 900MB. The maintenance effort
removed some binary bombs (eg, simulation results that had been
inadvertently added over the years) and other artefacts that caused
the repository to bloat, while preserving the change history.
This benefit is unfortunately associated with a significant aggravation
for those developers who have been actively working with the latest
development versions. We sincerely apologize for the difficulties
that this incurs. We are all too aware of how annoying this is,
since we too are directly affected by the same issue.
Since all commits and branch histories in git are secured with SHA1
signatures, any changes will result in new SHA1 values for the
commits. So even when file-tree contents are identical, the SHA1 of
two individual commits likely are not.
To reduce confusion, branches related to v1906 (master and develop)
have been expunged from the old repository. This circumvents the
possibility of duplicate commits or forgotten commits that would
otherwise occur if both repositories covered the same active code
Migrating your code
The file contents of the previous master and develop branches have been preserved and it should be possible to migrate any user code provided that it can be rebased. A mapping from the old-to-new commit hashes is available here.
To migrate your code, clone the new repository (shown here using https) and change working directory into it:
cd $HOME/OpenFOAMgit clone https://develop.openfoam.com/Development/openfoam.gitcd openfoam
Add your local repository as a remote which will be referred to by the alias 'local-repo'
At this point you can apply your local change commits to the latest master or develop branches using git-format-patch and git-cherry-pick (see below). Alternatively, if you would like to re-apply your changes to the equivalent starting point in the new repository continue to the next section.
Recovering an old branching location
Skip this section if you would like to apply your local changes to the latest master/develop branches.
Use the SHA1 mapping from old-to-new to find your starting/base commit. For example, if your branching point was XXXX identify the equivalent commit (noted YYYY later) in the new repository using:
grep XXXX old-to-new.map
Note that git offers the merge-base command to identify your branching point (XXXX) from your old repo/local branch to the old OpenFOAM-plus develop branch :
git merge-base HEAD origin/develop
Note: if you branched from the 'master' branch, replace 'origin/develop' by 'origin/master'.
Start by creating a new branch from the equivalent commit (YYYY) in the new repository:
git checkout -b new-base YYYY
Reintroduce your changes, e.g. using git-format-patch or git-cherry-pick (see below). These should apply relatively cleanly - if there are conflicts you will need to perform additional integration updates.
This will extract all your changes into a single text file which can then be 'replayed' onto the new repository. From your current repository (with your own code changes):