DEV Community

Toolloom
Toolloom

Posted on • Originally published at toolloom.com on

Don't Forget to Prune Your Local Git Branches!

We all forget to delete local branches after merging. Over time, your local repository gets cluttered with references to branches that are long gone on the remote. To keep your workspace tidy, run git fetch --prune regularly. This command cleans up stale tracking references locally, making commands like git branch -vv much easier to read and ensuring you don't accidentally base new work off a dead remote branch.

Top comments (0)