menu

arrow_back How do I get rid of forgotten git branches?

by
1 vote
My repository follows the story below
a9350ab71c9446aeb5c4a9965118e942.png


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

by
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)