# Update Git Repository with Sample HTML File

### Tasks

* A repository named `/opt/games.git` has been created.
* It has been cloned to `/usr/src/kodekloudrepos/games` on the **storage server**.
* A sample `index.html` file is located on the **jump host** at `/tmp/index.html`.
* Copy the file to `/usr/src/kodekloudrepos/games` on the storage server.
* Add and commit the file to the repository.
* Push the changes to the `master` branch.

### Steps

{% stepper %}
{% step %}
Check the file location

```bash
cd /tmp
ls
```

<figure><img src="https://3155059101-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ftpxp8dhlubc3j58Iygn5%2Fuploads%2FpMqTJyObrULe7dpr5aVf%2Fimage.png?alt=media&#x26;token=6eff6ea9-e4c8-47c9-8f98-3d0ff2bfc639" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Copy file

```
sudo scp /tmp/index.html natasha@ststor01:/tmp
```

passwd : Bl\@kW

<figure><img src="https://3155059101-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ftpxp8dhlubc3j58Iygn5%2Fuploads%2FvGgTlTZWlqIbtA9cfZUv%2Fimage.png?alt=media&#x26;token=4039f9a0-4c17-49ec-8578-5b6d23aaab04" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
SSH into the Storage server (natasha's server :joy:)

```
ssh natasha@ststor01
```

{% endstep %}

{% step %}
Copy index.html to the path

```
cp index.html /usr/src/kodekloudrepos/games
```

{% endstep %}

{% step %}

### Navigate to games directory

```
cd /usr/src/kodekloudrepos/games
```

<figure><img src="https://3155059101-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ftpxp8dhlubc3j58Iygn5%2Fuploads%2FqlqmnnztK1qFkrT0fjcQ%2Fimage.png?alt=media&#x26;token=7742e974-202f-437a-8819-7cbfac8a6a13" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Git status

```bash
sudo git status
```

<figure><img src="https://3155059101-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ftpxp8dhlubc3j58Iygn5%2Fuploads%2FvIpFsHmmcPH7vK9VC7dQ%2Fimage.png?alt=media&#x26;token=3aaa2e6a-e44a-4354-9628-04afb834d6e6" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Add, Commit and Push

```bash
sudo git add index.html
sudo git commit -m "add index.html"
sudo git push origin master 
```

<figure><img src="https://3155059101-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ftpxp8dhlubc3j58Iygn5%2Fuploads%2FhQaDKZhrlm163C1odBLJ%2Fimage.png?alt=media&#x26;token=8de7614e-0036-471f-935c-b334981cbe7b" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}
