git config pull with prune

C++
git config remote.origin.prune true

Source

Also in C++: