... | ... | @@ -19,12 +19,12 @@ $ 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.
|
|
|
$ git checkout -b spencerdev
|
|
|
fatal: A branch named 'spencerdev' already exists.
|
|
|
```
|
|
|
If this happens, first ensure that branch has previously been merged into master, then delete the branch:
|
|
|
```
|
|
|
$ git branch -d spencerdev1
|
|
|
$ git branch -d spencerdev
|
|
|
```
|
|
|
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.
|
|
|
|
... | ... | @@ -64,6 +64,19 @@ $ git push -u origin <yourbranchname> |
|
|
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.
|
|
|
Click 'Compare branches and continue'. On the next page:
|
|
|
|
|
|
## For Asignees |
|
|
* Change the title of the merge request if you like.
|
|
|
* Fill out a brief description of what changes you are merging in.
|
|
|
* Choose Olivier Shelbaya, Thomas Planche, or Brad Schultz as the Assignee.
|
|
|
* Check the box 'Delete source branch when merge request is accepted.'
|
|
|
* Click 'Submit merge request'. The assignee you selected will receive an e-mail, and likely the changes will be merged into master within a day or so.
|
|
|
|
|
|
|
|
|
## 6. Delete the development branch on your local machine
|
|
|
|
|
|
This is encouraged to ensure that the next time changes are done, they are started from the most recent version of master.
|
|
|
```
|
|
|
$ git checkout master
|
|
|
$ git branch -d spencerdev
|
|
|
``` |
|
|
\ No newline at end of file |