Automatic Prune With Git Fetch Or Pull
Answer : Since git 1.8.5 (Q4 2013): " git fetch " (hence " git pull " as well) learned to check " fetch.prune " and " remote.*.prune " configuration variables and to behave as if the " --prune " command line option was given. That means that, if you set remote.origin.prune to true: git config remote.origin.prune true Any git fetch or git pull will automatically prune. Note: Git 2.12 (Q1 2017) will fix a bug related to this configuration, which would make git remote rename misbehave. See "How do I rename a git remote?". See more at commit 737c5a9: Without " git fetch --prune ", remote-tracking branches for a branch the other side already has removed will stay forever. Some people want to always run " git fetch --prune ". To accommodate users who want to either prune always or when fetching from a particular remote, add two new configuration variables " fetch.prune ...