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:
- Switch the svn-remote
urlsetting to the new name. - Run
git svn fetch. This needs to fetch at least one new revision from svn! - Change the svn-remote
urlsetting back to the original URL. - Run
git svn rebase -lto do a local rebase (with the changes that came in with the last fetch operation). - Change the svn-remote
urlsetting back to the new URL. - Now,
git svn rebaseshould work again.
Adventurous souls may want to try --rewrite-root.