# Git Clean

### Tasks&#x20;

1. Navigate to the Git repository located at `/usr/src/kodekloudrepos/cluster` on the Storage server.
2. Remove any untracked files and directories (files that are not committed to Git).
3. Do not add or push any new files.
4. Ensure that `git status` shows a clean working tree (no changes, no untracked files).

### Steps

{% stepper %}
{% step %}
SSH to storage server and switch to root if needed

```bash
ssh natasha@ststor01
sudo su -
```

{% endstep %}

{% step %}

### Navigate to cluster directory

```bash
cd /usr/src/kodekloudrepos/cluster
```

{% endstep %}

{% step %}
Check for untracked files

```bash
git status
```

<figure><img src="https://3155059101-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ftpxp8dhlubc3j58Iygn5%2Fuploads%2FdRE6TAoUGgGqRO0jaz46%2Fimage.png?alt=media&#x26;token=1693870f-7bf5-4fbe-a668-d8076e0ad28e" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Remove all untracked files and directories

<figure><img src="https://3155059101-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ftpxp8dhlubc3j58Iygn5%2Fuploads%2Fmgb2Q2bfqlyguapMSf4m%2Fimage.png?alt=media&#x26;token=18db9974-ee41-4942-afed-df0464fa4185" alt=""><figcaption></figcaption></figure>

```bash
git clean -fd
```

{% endstep %}

{% step %}
Verify it says: "nothing to commit, working tree clean"

```bash
git status
```

<figure><img src="https://3155059101-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ftpxp8dhlubc3j58Iygn5%2Fuploads%2F2auDtxpQoXwpbhYp1sHG%2Fimage.png?alt=media&#x26;token=1e14e66a-64b4-43a9-b6f1-b4a64408b02b" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}
