git pull --prune code example
Example 1: git prune while fetch globally
git config --global fetch.prune true
Example 2: git config pull with prune
git config remote.origin.prune true
git config --global fetch.prune true
git config remote.origin.prune true