Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove unused git branches

How can one remove unused git bracnhes from Tortoise-Git? These branches have been removed both locally and remotely, i'd like to not see them anymore when using this dropdown

enter image description here

like image 880
James Raitsev Avatar asked Jan 04 '12 22:01

James Raitsev


People also ask

Should I delete unused branches git?

They're unnecessary. In most cases, branches, especially branches that were related to a pull request that has since been accepted, serve no purpose. They're clutter. They don't add any significant technical overhead, but they make it more difficult for humans to work with lists of branches in the repository.


1 Answers

As of TortoiseGit 2.4.0.2 there is a way to let it execute git remote prune origin. In the Sync window you can select "Clean up stale remote branches" which then will remove all already removed remote branches from your local cache.

I don't know if this already exists in previous versions, because I normally use the command line ^^

like image 73
Neithan Avatar answered Oct 15 '22 08:10

Neithan