Skip to content
Snippets Groups Projects
index.md 1.28 KiB
Newer Older
Laurent Heirendt's avatar
Laurent Heirendt committed
title: Welcome
Yohan Jarosz's avatar
Yohan Jarosz committed
order: 1
Laurent Heirendt's avatar
Laurent Heirendt committed
<center><img src="assets/img/r3-training-logo.png" height="150px"/></center>
Laurent Heirendt's avatar
Laurent Heirendt committed
# Basic git course

## Practice repository
Yohan Jarosz's avatar
Yohan Jarosz committed

Laurent Heirendt's avatar
Laurent Heirendt committed
First, fork and clone this practice repository.
Jacek Lebioda's avatar
Jacek Lebioda committed

Laurent Heirendt's avatar
Laurent Heirendt committed
Add a remote to the upstream repository:
```bash
Valentin Groues's avatar
Valentin Groues committed
$ cd basic-practice-pages
Marina Popleteeva's avatar
Marina Popleteeva committed
$ git remote add upstream ssh://git@gitlab.lcsb.uni.lu:8022/R3/school/git/basic-practice-pages.git
Valentin Groues's avatar
Valentin Groues committed
$ git fetch upstream
Laurent Heirendt's avatar
Laurent Heirendt committed
```
Laurent Heirendt's avatar
Laurent Heirendt committed
Then, create a separate branch from the develop branch:
```bash
$ git checkout -b myBranch upstream/develop
```
Laurent Heirendt's avatar
Laurent Heirendt committed
Add your name file in the `attendees` directory:
Laurent Heirendt's avatar
Laurent Heirendt committed
When you are done editing your file, add the file to the stage and commit it:
```bash
$ git add attendees/myName.md
$ git commit -m "Edit the content of the subpage myName.md"
```
Jacek Lebioda's avatar
Jacek Lebioda committed

Laurent Heirendt's avatar
Laurent Heirendt committed
Once you are done committing, you can push your branch to your fork:
```
$ git push origin myBranch
```
Laurent Heirendt's avatar
Laurent Heirendt committed
## Open a merge request
Laurent Heirendt's avatar
Laurent Heirendt committed
If you now browse to your fork on Gitlab, you can open a merge request and submit it for review.
Laurent Heirendt's avatar
Laurent Heirendt committed
> Please make sure to select `develop` as the target branch.

> 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.

Once the pull request has been accepted, you will be able to see your page online!