# Lab 3

## Solution

#### Step 1: Fork this repo

1. Click the "Fork" button in the top right corner of the repository page.
2. Select your user or organization account to create a fork of the repository.

#### Step 2: Clone your fork and set up origin and upstream remotes properly

4. Clone your fork to your local machine:

```bash
git clone git@gitlab.fi.muni.cz:YOUR_PLACE/mastering-git.git
```

5. Change into the cloned directory:

```bash
cd mastering-git
```

6. Add the original repository as the "upstream" remote:

```bash
git remote add upstream https://gitlab.fi.muni.cz/red-hat/mastering-git/
```

Now, your fork has two remotes: "origin" (your fork) and "upstream" (the original repository).


#### Step 3: Contribute using a merge request

7. Create a new branch for your contribution:

```bash
git switch -c <what-should-i-type-here?>
```

#### Step 4: Open class3.md and edit it

9. Write down your favourite option or an argument

```
My favourite...
```

#### Step 5: Commit and push to your fork

10. Stage the changes and commit:

```bash
git add class3.md
git commit -m "what is a good commit message?"
```

11. Push the changes to your fork:

```bash
git push origin
```

#### Step 6: Open the merge request

Open https://gitlab.fi.muni.cz/red-hat/mastering-git/ and click "Create merge request".


Congratulations!
