---
title: "Delete a reference"
method: DELETE
path: "/repos/{owner}/{repo}/git/refs/{ref}"
tags: ["git"]
---

# Delete a reference

`DELETE /repos/{owner}/{repo}/git/refs/{ref}`

Deletes the provided reference.

## Path parameters

- `owner` string, required
- `repo` string, required
- `ref` string, required

## Response `204`

Response

## Other responses

- `409` — Conflict
- `422` — Validation failed, or the endpoint has been spammed.

## Changes

- **2024-03-11** (3.8) `45558529b5e2` — 1 info
  - added the non-success response with the status `409`

[Change history](https://skmtc.dev/github/apis/enterprise-server/changes/repos/:owner/:repo/git/refs/:ref/delete.md)

---

[API](https://skmtc.dev/github/apis/enterprise-server.md) · [All operations](https://skmtc.dev/github/apis/enterprise-server/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/github/enterprise-server/revisions/5438365412fe/schema)
