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.
If you plan to contribute a patch to Eigen you have to follow our GitLab workflow:
- Fork the official Eigen repository.
- Clone your fork.
- Create a new feature branch.
- Make your changes and commit them.
- 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 email@example.com:libeigen/eigen.git $ 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