Commit e8d28671 authored by Nigel Kukard's avatar Nigel Kukard
Browse files

Added howto on using GitLab the right way

parent 0bf909dd
Contributing to a Repository
============================
The right way to contribute changes to a repository.
## Forking
* Log into [[https://gitlab.devlabs.linuxassist.net|GitLab]]
* Find the project you're wanting to change, click on the repository
* Top right hand side, click "Fork"
You now have your own copy of the repository.
## Clone Locally
Clone the repository locally...
```sh
git clone ssh://git@gitlab.devlabs.linuxassist.net/yourusername/yourreponame.git
cd yourreponame
git config format.signature true
```
You should probably add the upstream repository too so you can do merges and rebases...
```sh
git remote add upstream ssh://git@gitlab.devlabs.linuxassist.net/upstream/repo.git
```
## Make Your Changes
Make and commit your changes, merge your commits, go mad.
### Branching
For each separate change you going to make you must create a branch...
```sh
git checkout master -b your-change-name
```
### Committing You Changes
Commit your chagnes as usual, making sure of course all your changes must contain the Signed-Off line.
## Submitting Your Changes
Be sure to read the code Submission Policy: https://gitlab.devlabs.linuxassist.net/allworldit/allworldit/blob/master/Submission%20Policy.md
### Push Changes
Make sure your code is based off the main repo and push your branch...
```sh
git fetch upstream
git checkout yourbranchname
git rebase upstream/master
git push origin yourbranchname:yourbranchname
```
### Submit Upstream
Using the web interface you can then create a merge request:
* Click on your repository, click "Create Merge Request"
* Select the repository and branch on the top left and top right
* Type in a description of your changes
* Click "Submit merge request"
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