Working in a Branch

Read this section if you want to develop a new MercuryDPM Kernel feature.

  • Before you can develop a new MercuryDPM Kernel feature, you need access to the development version of the code. Please contact one of the MercuryDPM 'managers' to get access.
  • You now should have read access to the master branch and read-write access to all other branches of the repository. You can check that that you have access using git fetch:
    git fetch https://bitbucket.org/mercurydpm/mercurydpm.git
  • All new Kernel features should be developed in a branch, i.e. in a subdirectory of Branches/. For example, say you want to develop a new wall type called StarShapedWall. The first step is to create your own branch using the following command:
    git checkout -b new-branch
    Scalar * b
    Definition: benchVecAdd.cpp:17
  • Checkout your new branch.
    git checkout new-branch
  • Now start working in your branch. This branch is only for you, so you can commit as often as you like, even if your code does not compile. I fact, we urge you to commit regularly.

Once your feature is developed fully, you are ready to merge the feature back to the Master:

  • Make sure all your changes are committed to your Branch. Executing "git status" in the source directory should not return any output.
  • Make sure all your code compile correctly. Executing "make fullTest" in the build directory should return "100% tests passed".
  • Make your branch up-to-date with the master. See Merging master updates to your Branch.
  • The final step is to merge your Branch back into the Master, and remove the Branch. Updating the Master is a sensitive issue, so only the 'managers' are allowed to do it. So please ask one of the managers (see http://mercurydpm.org/about-the-code/team) to merge your changes.
  • Now you have developed your (first?) Kernel feature, and earned the right to appear on the MercuryDPM team website. Congratulations!