# Delete Git Branch

### Tasks

* Delete the `xfusioncorp_beta` branch from the Git repo at `/usr/src/kodekloudrepos/beta` on the Storage Server.

### Steps

{% stepper %}
{% step %}
SSH into the Storage server:

```bash
ssh natasha@ststor01
```

{% endstep %}

{% step %}

### Get the repo

```
cd /usr/src/kodekloudrepos/beta
sudo git config --global --add safe.directory /usr/src/kodekloudrepos/beta
```

{% endstep %}

{% step %}
Check if this branch is exist there or now

```
sudo git branch --list xfusioncorp_beta
```

{% endstep %}

{% step %}
Check the branches

<pre><code><strong>sudo git branch
</strong></code></pre>

{% endstep %}

{% step %}
Change to the master

```
sudo git checkout master
```

<figure><img src="https://3155059101-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ftpxp8dhlubc3j58Iygn5%2Fuploads%2FBZJQJh7RSYLRZbbVOt0K%2Fimage.png?alt=media&#x26;token=f9211086-ded2-4f55-bfc6-89886039d560" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Change the permissions

```bash
sudo chown -R natasha /usr/src/kodekloudrepos/beta
sudo chmod -R u+rwx /usr/src/kodekloudrepos/beta
```

{% endstep %}

{% step %}
Delete the branch

```bash
git branch -D xfusioncorp_beta
```

<figure><img src="https://3155059101-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ftpxp8dhlubc3j58Iygn5%2Fuploads%2FJXfBoSWYoaypte10r4pk%2Fimage.png?alt=media&#x26;token=59cc30f7-9df6-4f71-996a-884b10b7df33" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Verify now

```
git branch
```

<figure><img src="https://3155059101-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ftpxp8dhlubc3j58Iygn5%2Fuploads%2FFx0IGIxeSte0V5pfnWAk%2Fimage.png?alt=media&#x26;token=e9b0ad94-5526-4ae6-b124-49fc1fb41275" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}
