arrow_back How do I get rid of forgotten git branches?

1 vote
My repository follows the story below

Branches without a continuation have no name, at the command git branch -a they are not visible. I would like to get rid of such branches in the remote repository. How do I do this if I only know the commit hash?

1 Answer

0 votes
I would start with
git fetch origin
git remote prune origin

then go to that remout via shell and do a git gc there (although it should normally run there by itself)