Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GitHub REST API For Delete Branch

Tags:

git

github

I've been reading the GitHub API Documentation and searching around. It seem like there's no REST API for deleting a branch in GitHub? The closes thing I found is another post on Github enterprise API delete branch after merge.

Is there a reason why that is? What is the proper way to delete a branch using REST API?

like image 202
YTKme Avatar asked Sep 07 '25 07:09

YTKme


1 Answers

Branches are references to a commit. The documentation you seek is called Delete a reference.

Here is some more information on Git references.

like image 143
TTT Avatar answered Sep 10 '25 04:09

TTT