Delete a reference

DELETE /repos/:owner/:repo/git/refs/:ref

Example deleting a branch

curl -u username:token -X DELETE \
  https://api.github.com/repos/octocat/Hello-World/git/refs/heads/feature-a

Response

Status: 204 No Content

Example deleting a tag

curl -u username:token -X DELETE \
  https://api.github.com/repos/octocat/Hello-World/git/refs/tags/v1.0

Response

Status: 204 No Content