Search code examples
git-svngit-tag

Remove svn tags/branches from git repository, after removing svn remote


I've removed svn remote from my git repo, by removing it from .git/config and deleting .git/svn/ according to How to remove subversion remote in git?

Now the problem is that output of branch command is:

git branch -a
* master
  remotes/origin/master
  remotes/tags/0.1
  remotes/tags/0.1.1
  remotes/trunk

How can I remove remotes/trunk? And remotes/tags/0.1.1? This is obviously from svn-related stuff, but I have no idea how to remove that.


Solution

  • Ok, so it turns out that svn handles tags as branches, and these are all remote branches that are left. They can be removed with

    git branch -d -r trunk
    git branch -d -r tags/0.1
    git branch -d -r tags/0.1.1