An svn repository I'm mirroring through git-svn has changed URL.
In vanilla svn you'd just do svn switch --relocate old_url_base new_url_base.
How can I do this using git-svn?
Simply changing the svn url in the config file fails.
An svn repository I'm mirroring through git-svn has changed URL.
In vanilla svn you'd just do svn switch --relocate old_url_base new_url_base.
How can I do this using git-svn?
Simply changing the svn url in the config file fails.
This handles my situation pretty well:
https://git.wiki.kernel.org/index.php/GitSvnSwitch
I cloned using the file:// protocol, and wanted to switch to the http:// protocol.
It is tempting to edit the url setting in the [svn-remote "svn"] section of .git/config, but on its own this does not work. In general you need to follow the following procedure:
url setting to the new name.git svn fetch. This needs to fetch at least one new revision from svn!url setting back to the original URL.git svn rebase -l to do a local rebase (with the changes that came in with the last fetch operation).url setting back to the new URL.git svn rebase should work again.Adventurous souls may want to try --rewrite-root.
Git svn relies heavily on the svn URL. Every commit that is imported from svn has a git-svn-id that includes the svn URL.
A valid relocations strategy is to call git-svn clone on the new repository and merge the changes onto that new close. For a more detailed procedure, see this article:
http://www.sanityinc.com/articles/relocating-git-svn-repositories