The answer from robrich has good advice: you can simply delete each branch of the remote tracking (or even the remote one), and then use git fetch to grab only the ones you want now from scratch.
If you try to delete the remote all together, you can back up your .git / config file so that when adding remote access later you can choose the setting for the remote source from the backup.
However, deleting the remote does not delete the remote tracking branches for me. Maybe my local repo is bad. For those who have the same problem, I ended up:
In addition, I have many tags from the remote, which slows down. I did it too:
You might want to tweak git fetch so that you don’t have to return all those tags next time, which is beyond the scope of this question.
source share