I have setup a central backup server which has all the developer repos added as remotes. I fetch everyday from all the remotes. It gives me all the branches of developers as dev1/master, dev1/FeatureA, dev2/master, dev2/Hotfix etc. I do this so that I have backup of user repos in case a local system crashes. Things are all fine.
The problem that I face is:
When say dev1's Repo has 2 branches Br1 and Br2 that are tracked on backup via dev1/Br1 and dev1.Br2 respectively. Now the developer deletes one of the branches, say Br1. I do a fetch at EOD on backup server. The backup server still shows that dev1 has Br1 branch.
How can I make fetch replace all existing branches with the new ones, i.e. also delete dev1/Br1 if the remote (dev1) repo deletes the branch?
 
    