git delete local branch if remote deleted code example
Example 1: git remove deleted remote branches
git fetch origin --prune
Example 2: delete local and remote branch github
$ git push <remote_name> :<branch_name>
git fetch origin --prune
$ git push <remote_name> :<branch_name>