Delete local branches in GIT

Command to delete local branches in GIT that we no longer have in the repository.

I filtered out master, main and develop just in case.

git for-each-ref --format '%(refname:short)' refs/heads | grep -v "master\|main\|develop" | xargs git branch -D