From Eigen
Jump to: navigation, search

Git is the source-control management (SCM) tool that we use for Eigen. This page is not intended to be a Git tutorial but a brief wrap-up on how we use Git for Eigen.

GitLab Workflow

Eigen's sources are hosted on GitLab where we use a fast-forward merge and squash policy.

If you plan to contribute a patch to Eigen you have to follow our GitLab workflow:

  1. Fork the official Eigen repository.
  2. Clone your fork.
  3. Create a new feature branch.
  4. Make your changes and commit them.
  5. Create a merge request. The title and description of your merge request will be the commit message once the request gets merged so make sure to add a descriptive and condensed title and an informative and clear description. Please make sure to enable the option "Allow commits from members who can merge to the target branch." to enable maintainers to rebase your branch.

Keep your fork in sync

If you plan to contribute to Eigen more than once, it's necessary to synchronize it with the official Eigen repository. This can be done using plain Git by adding the official repository as a second remote. You can then rebase to it.

First make sure you are on the master branch of your fork:

 $ git checkout master

Add the official Eigen repository as a second remote and fetch it:

 $ git remote add upstream
 $ git fetch upstream

Rebase your local master branch to 'upstream/master':

 $ git rebase upstream/master

Push your local master branch to your upstream fork:

 $ git push origin master:master

Optionally remove the second remote again:

 $ git remote rm upstream