Reputation: 34026
I somehow added a fork as a remote to my local repository and later on I issued git pull
- to my dismay git pulled all fork branches as local tracking branches. How can I undo this with one command ? All branches show in gitk as remote/wr/branchname
Do I then have to remove the entry from .git/config
?
[remote "wr"]
url = https://github.com/AUTHOR/wrye-bash.git
fetch = +refs/heads/*:refs/remotes/wr/*
Upvotes: 0
Views: 795
Reputation: 34026
Took me a bit of experimentation (I am not a console person):
git branch -rd $( git branch -r | grep 'wr/' )
Now if only I could add a dry run switch...
Upvotes: 1