Writing documentation with Gitlab IDE

Summary

The overall process consists of 3 parts:

  1. create a new branch to work on
  2. make modifications and save them (commits)
  3. finally, merge the modified branch back to the main master branch (merge)

The steps are detailed below.

I. Creating a new branch

  1. Go to the documentation project: https://git.xfel.eu/SCS/documentation
  2. Create a new branch…
../_images/create-branch.png
  1. …with the name of your choice, here ‘how-to-write-doc’.
../_images/new-branch.png

II. Make modifications (commits)

  1. From the new branch (circled in red), start Gitlab IDE (integrated development environment)
../_images/start_IDE.png
  1. Make modifications to the documentation
../_images/writedoc.png
  1. Click on source control. The number tells how many files were modified.
../_images/source-control.png
  1. Commit and push the new changes
../_images/commit_push.png
  1. Select branch. In principle one could part I. and enter the new branch name at this stage. Since we already created a new branch, we select it.
../_images/select-branch.png

III. Merging

  1. Go back to the documentation project and create a merge request
../_images/back-to-doc-project.png ../_images/create-MR.png ../_images/create-MR2.png
  1. Ask colleagues to review the changes, and once satisfied, push on “Merge”
../_images/Merge.png
  1. If you need to make more changes, from the documentation project, select the branch you want to work on, launch the IDE and follow part II. again.