Cleanup local Git from deleted remote branches

0
Please complete the required fields.




Please wait...

When working with Git after some time local repository has excess branches which create a mess.

There is an easy way to remove branches from local repo that were deleted from remote.

Before Git 1.6.6

Two steps are needed: fetch and prune

git fetch
git remote prune your_remote

your_remote – for example origin

Git 1.6.6 and above

This version introduced command that combines fetching and pruning.

git fetch --prune

Leave A Reply

Your email address will not be published.