Commit 221ab04b authored by Rami Alshafi's avatar Rami Alshafi

Updated getting_started.md

parent a4b7f3f5
......@@ -4,7 +4,7 @@ Please send your name and e-mail to staff@openconnectivity.org with the subject
In order to enable SSH access to git lab, an SSH key pair needs to be used. Learn how to create one [here](https://gitlab.openconn.org/help/ssh/README#generating-a-new-ssh-key-pair) or learn how to use an already existing ssh key [here](https://gitlab.openconn.org/help/ssh/README#locating-an-existing-ssh-key-pair).
Once you obtain an SSH key pair, learn how to add it to your Gitlab account [here](https://gitlab.openconn.org/help/ssh/README#adding-an-ssh-key-to-your-gitlab-account).
Once the ssh key has been added, it is advised to test the setup. Learn how to test the added ssh key [here](https://gitlab.openconn.org/help/ssh/README#testing-that-everything-is-set-up-correctly).
# Workflow
# Working with Gitlab
## Cloning a repository
To find a project, log in to your Gitlab account and select the "Projects" tab in the upper left corner then select "Explore projects" from the dropdown menu
![Explore projects](/assets/1.png)
......@@ -28,14 +28,35 @@ From the root directory of your local cloned repository, type the following comm
***
$ git checkout -b (name of your branch)
***
![New branch cmd](/assets/newBranch.PNG)
### commit changes
Once you make the changes, stage and commit your changes and push your local branch to the remote repository with the following command
***
$ git push -u origin (name of your branch)
***
### Create the merge request.
Log into your Gitlab account and go to the project and checkout your branch and issue the merge request.
### Merge conflicts
Merge conflicts will be highlighted in a merge request along with the result of the CI testing. More commits and code changes can be made within the merge request. Once the merge conflict is complete, assign it to someone with merge privileges to merge your changes.
### House keeping
It is customary to squash all commits in your feature branch into one or a few logically organized commits and delete your feature branch once merged into the target branch.
Log into your Gitlab account and go to the project and checkout your branch from the drop down menu
![checkout branch](/assets/checkoutNewBranch.PNG)
From the same page, click the "Create merge request" blue button in the upper right corner to issue the merge request.
![MR Button](/assets/MRButton.PNG)
The merge request form will open up, fill it out with the proper title and description. If you are still working on the changes, assign it to yourself and include the "WIP:" prefix in the title. Otherwise, assign it to the responsible maintainers if the changes are completely done. The source and target branches will be auto-selected but they could be changed as needed.
![MR Form](/assets/MRForm.PNG)
It is customary to squash all commits in your feature branch into one or a few logically organized commits and delete your feature branch once merged into the target branch. You can check these options now or later.
Once done filling out the merge request form, click on the "submit merge request" green button at the bottom.
![MR submit button](/assets/MRSubmitButton.PNG)
The merge request will be created and the CI pipeline will be kicked off if enabled.
Alternativly, you can also create a merge request from an issue which will automatically create a feature branch for it where the changes will end up along with a merge request with a pre-populated title among other fields.
![MR From Issue](/assets/MR_creation_from_issue.PNG)
### Working with Merge Requests
Now that you have a merge request, you can share it with a teammate to get their reviews and they can provide their feedback or contribute to the merge request; the step-by-step instructions of which will show up if you click on the "checkout branch" button from withi the merge request page.
![MR checkout branch](/assets/MR_checkout_branch.PNG)
![MR checkout branch example](/assets/MR_checkout_branch_eg.PNG)
Merge conflicts will be highlighted in the merge request along with the result of the CI testing. More commits and code changes can be made within the merge request. Once the merge conflict is resolved and all the changes are polished, assign it to someone with merge privileges to merge your changes.
## Issues
To create a new issue, click on the "issues" option in the main menu on the left and click on the "New issue" green button.
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment