#### If the repository already exists in ETSI's Gitlab and the local copy it is not up-to-date
```bash
git pull origin master
```
### Step 1 (**IMPORTANT)**: Create a local branch
This should be based on an up-to-date version of the code in the repo's `master`. If you are unsure, you should do:
```bash
git pull origin master
```
Then create a branch and move to it in order to continue. In this example, we will create a branch called `BranchNewSection` to store a new section that you are working on:
```bash
git checkout -b BranchNewSection
```
### Step 2: Local edition and commits
In this phase, you can edit your files as you would normally do.
From time to time, you might want to "save" snapshots of your changes. This process has two states:
- Putting files with modifications in your _stage area_.
- Once you have all you need in your _stage area_, create a local _commit_ out of this set of changes.
You can add those files to your _stage area_ as needed. For instance, this would add a file called `MyFile.md`:
```bash
git add MyFile.md
```
In case you wanted to add all files with any modification since the last commit, you could do:
```bash
git add .
```
Once you are ready, you can create a commit (which would serve as a kind of local "snapshot" of your changes:
```bash
git commit -m"My message to remember later on what was included in this commit"
```
Then you can continue editing until you are ready to share a contribution.
### Step 3: Contribute your branch and make a merge request
When your are ready, you can push your branch to the remote repo:
```
git push origin BranchNewSection
```
Once you have pushed your branch to the remote repo, you should **inform the editor of it by making a _merge request_**. This can be easily made in the [GitLab web]https://osm.etsi.org/gitlab/osm_doc/test/merge_requests() (your recently pushed branch would be there).
### Step 4: Wait for the result of the review
The merge request might have different potential results:
#### Your contribution was commented by the editor
### Your contribution has been integrated (merged) by the editor
The result would be available in the main edition branch (`master`).
You should update your local repository before attempting further edits:
```
git checkout master
git pull
```
### Step 5: (Once merged) update your local master
## TODO: Guide for editors
### Step 0: Setup of the repository and initial contribution
#### If you start from an empty local folder and the repo in ETSI's Gitlab is still empty **(RECOMMENDED)**
#### If you have the content in a local folder and the repo in ETSI's Gitlab is still empty (initial load of info)
If it was not under Git control yet, initialize it: