|
|
|
If you haven't cloned acc before, start by cloning the project onto your local machine:
|
|
|
|
```
|
|
|
|
$ cd /home/spencerkiy (or wherever you want the acc project to be)
|
|
|
|
$ git clone git@gitlab.triumf.ca:hla/acc.git
|
|
|
|
```
|
|
|
|
|
|
|
|
## 1. Checkout master branch & pull most recent version
|
|
|
|
|
|
|
|
```
|
|
|
|
$ git checkout master
|
|
|
|
$ git pull
|
|
|
|
```
|
|
|
|
|
|
|
|
## 2. Create a new branch for editing
|
|
|
|
|
|
|
|
```
|
|
|
|
$ git checkout -b <yourbranchname>
|
|
|
|
```
|
|
|
|
|
|
|
|
**note** that if you already have a branch named <yourbranchname>, you will get an error message:
|
|
|
|
```
|
|
|
|
$ git checkout -b spencerdev1
|
|
|
|
fatal: A branch named 'spencerdev1' already exists.
|
|
|
|
```
|
|
|
|
If this happens, first ensure that branch has previously been merged into master, then delete the branch:
|
|
|
|
```
|
|
|
|
$ git branch -d spencerdev1
|
|
|
|
```
|
|
|
|
It is not recommended to re-use the same branch after merging it into master. More common practice is to make a new branch (for example to add a feature), then when it is complete merge it into master and delete the development branch.
|
|
|
|
|
|
|
|
|
|
|
|
## 3. Make the desired changes.
|
|
|
|
For example, make a new file:
|
|
|
|
```
|
|
|
|
touch isac/sequence/my_new_sequence.xml
|
|
|
|
```
|
|
|
|
|
|
|
|
## 4. Add and commit your desired changes locally
|
|
|
|
You can get a summary of changes you've made with:
|
|
|
|
```
|
|
|
|
git status
|
|
|
|
```
|
|
|
|
Next, stage files to be commit that you want. Those can be done one at a time:
|
|
|
|
```
|
|
|
|
git add isac/sequence/my_new_sequence.xml
|
|
|
|
```
|
|
|
|
Or for example you can add all files that have been changed/updated:
|
|
|
|
```
|
|
|
|
git add -u
|
|
|
|
```
|
|
|
|
Last, commit the files you have stage in the adding process above, adding a summary message:
|
|
|
|
```
|
|
|
|
git commit -m "Added new sequence file"
|
|
|
|
```
|
|
|
|
|
|
|
|
## 4. Push the new branch to gitlab & request a merge into master
|
|
|
|
|
|
|
|
```
|
|
|
|
$ git push -u origin <yourbranchname>
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
## 5. Request a merge into master branch
|
|
|
|
Once you have pushed your branch to gitlab and the pipeline ran successfully, you can request for your changes to be merged into master. Go to 'Merge Requests' on the left menu, and select your branch as the source branch to be merged into master (the target branch):
|
|
|
|
![merge_initial](/uploads/aacc1c7b2f600998f0484fb38f08890a/merge_initial.png)
|
|
|
|
|
|
|
|
Click 'Compare branches and continue'. On the next page you can change the title and/or description of the merge request if you like. Then choose Olivier Shelbaya, Thomas Planche, or Brad Schultz as the Assignee and click 'Submit merge request'. Likely the changes will be merged into master within a day or so.
|
|
|
|
|
|
|
|
## For Asignees |