Where is the delete branch option in Gitea's website interface?

2.7k Views Asked by At

Right now, I'm exploring and getting familiar with the Gitea interface.
I must be blind since I've done this before with GitHub, GitLab, CodeStar, and many more.
I feel crazy for asking this but, where is the delete branch in the website?

enter image description here

I'm asking because if ever permissions were restricted or process-gates were setup,
I'd like to be able to cleanup after myself of no longer needed testing setups and broken branches. I've looked around for answers and I've only found:

  1. freeCodeCamp's basic git article suggesting git branch -d <branch>
  2. [GitHub > Issue] On Deleting Branch Completely which isn't my issue
  3. Gitea.Docs search returning "Delete a package" instead

I understand that there might not be a way, but I haven't found any discussion to reference regarding this. So I thought I'd ask the SO community to see if we find anything we can share here.
Thanks for reading this!

enter image description here

2

There are 2 best solutions below

1
Kraego On BEST ANSWER

Since the question was if there is a possibility to do this on the UI. The answer is yes (at least with Version: 1.20.5).

  1. Select branch:

Branchselection

  1. Delete it with the delete button:

enter image description here

2
VonC On

As noted in "How do I delete a Git branch locally and remotely?", a git branch -d <branch> would only delete the branch locally.
A git push --delete <branch> would delete it on Gitea.

That is what I would use whenever a UI does not readily show the option I need: use command-line and push.


That being said, the notion of deleted branch exists since Gitea 1.3.0, Q4 2017

And the button is shown in the branches page, only for branches which are not the default branch.

delete branch.