jlconlin jlconlin - 1 year ago 125
Git Question

How to remove subversion remote in git?

I have a git repository that was originally created using git-svn. Now I have a git server that I push to and the svn repository has been lost. Can I remove the svn remote? How?

Answer Source

You can edit the .git/config file and remove the section associated with the remote you want to remove.

The lines you want to remove probably look roughly like this:

[svn-remote "svn"]
    url = url-of-svn-repository/trunk
    fetch = :refs/remotes/git-svn

This will remove the remote from git, but you will still have the relationship between the git commits and the svn commits stored in .git/svn. You can remove this whole directory if you want to get rid of all your svn remotes. If you want to get rid of just one SVN remote and keep others, you will need to look at the directory structure and only remove the ones associated with the remote you are removing.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download