README.md 1.23 KB
Newer Older
Daniel Duarte's avatar
Daniel Duarte committed
1
<img src="assets/img/r3-training-logo.png" height="150px"/>
Laurent Heirendt's avatar
Laurent Heirendt committed
2

Daniel Duarte's avatar
Daniel Duarte committed
3
4
# Advanced git course - Practice repository

Laurent Heirendt's avatar
Laurent Heirendt committed
5
First, fork and clone this practice repository.
Daniel Duarte's avatar
Daniel Duarte committed
6

Laurent Heirendt's avatar
Laurent Heirendt committed
7
Add a remote to the upstream repository:
Daniel Duarte's avatar
Daniel Duarte committed
8
```bash
Laurent Heirendt's avatar
Laurent Heirendt committed
9
10
11
$ cd advanced-practice
$ git remote add upstream ssh://git@git-r3lab-server.uni.lu:8022/R3/school/git/advanced-practice.git
$ git fetch
Daniel Duarte's avatar
Daniel Duarte committed
12
13
```

Laurent Heirendt's avatar
Laurent Heirendt committed
14
15
16
17
Then, create a separate branch from the develop branch:
```bash
$ git checkout -b myBranch upstream/develop
```
Daniel Duarte's avatar
Daniel Duarte committed
18

Laurent Heirendt's avatar
Laurent Heirendt committed
19
Add your name file in the `attendees` directory:
Daniel Duarte's avatar
Daniel Duarte committed
20
21
22

When you are done editing your file, add the file to the stage and commit it:
```bash
Laurent Heirendt's avatar
Laurent Heirendt committed
23
$ git add attendees/myName.md
Daniel Duarte's avatar
Daniel Duarte committed
24
25
26
27
28
29
30
31
$ git commit -m "Edit the content of the subpage myName.md"
```

Once you are done committing, you can push your branch to your fork:
```
$ git push origin myBranch
```

Laurent Heirendt's avatar
Laurent Heirendt committed
32
## Open a merge request
Daniel Duarte's avatar
Daniel Duarte committed
33

Laurent Heirendt's avatar
Laurent Heirendt committed
34
If you now browse to your fork on Gitlab, you can open a pull request and submit it for review.
Daniel Duarte's avatar
Daniel Duarte committed
35
36
37
38
39
40

:warning: Please make sure to select `develop` as the target branch.

:warning: Watch out for comments from the reviewer! If there are things to be changed, simply change locally, commit,
and then push again. The pull-request will update automatically.

Laurent Heirendt's avatar
Laurent Heirendt committed
41
Once the pull request has been accepted, you will be able to see your page online! :tada: