13

I'm working with a git repository using git-svn. Everything went fine until the day the maintainers of the svn repository decided to move the repository to a different URL.

How can I tell my git-svn client to fetch from the new svn repository?

I've changes the svn URL in the svn-remote of .git/config but now I get the following error:

svn-remote.svn.url already set: https://old.svn.repo
wanted to set to: https://new.svn.repo
Fabian Jakobs
  • 28,815
  • 8
  • 42
  • 39
  • quite related: http://stackoverflow.com/questions/661018/pushing-an-existing-git-repository-to-svn – cregox Oct 31 '11 at 18:14

2 Answers2

2

There may be trouble...since git-svn embeds the SVN url into each commit message. Hopefully that isn't a problem as well. You may need to rewrite your entire history to change all of the commit messages (using git filter-branch). But that could cause trouble if you've pushed anywhere else outside of back to SVN.

davr
  • 18,877
  • 17
  • 76
  • 99
  • I probably have to rewrite the history. Since I want to reorganize other things as well I'll just make fresh svn clone. – Fabian Jakobs Feb 03 '10 at 09:18
1

You might also need to change the .git/svn/.metadata file.

Jakob Borg
  • 23,685
  • 6
  • 47
  • 47