git fetch prune all code example
Example 1: git fetch prune
git fetch --prune #is the best utility for cleaning outdated branches. It will connect to a shared remote repository remote and fetch all remote branch refs. It will then delete remote refs that are no longer in use on the remote repository
Example 2: git config pull with prune
git config remote.origin.prune true