[clug] Another git question - git-svn stuff

Danny Robson danny at blubinc.net
Tue Nov 18 22:57:45 GMT 2008

On Tue, 18 Nov 2008 18:40:07 +1100
Alex Satrapa <grail at goldweb.com.au> wrote:

> Any ideas how I can go about changing the git repository (on my  
> laptop) to get back in sync with the Subversion repository (on the
> now- SSL-enabled webserver not under my control)?

You might be able to work around it with the follow addition to your
git project config:

           This allows users to create repositories from alternate
URLs. For example, an administrator could run git-svn on the server
locally (accessing via file://) but wish to distribute the repository
with a public http:// or svn:// URL in the metadata so users of it will
see the public URL.

Using rewriteRoot seems to allow you to pretend it was at the old
location, which is a bit of a hack, but seems to work. That said, my
experience with git-svn has been shaky at best. If you have the
time/resources it may be better to do a fresh clone.

> I can svn checkout just fine. I guess one option is to use git-svn
> to checkout the parent again, then pull the changes from my now-dead
> git repository, then git-svn dcommit the changes to the Subversion  
> repository.. but that seems like a bit too much work for what is (at  
> it's root) a single letter change...

From memory (and I'm sure someone will correct me if I'm wrong), the
problem is that the URL to the SVN repository forms some part of the git
repository data for each change. As each change is combined with the
previous change's hash, changing the URL involves changing the
hashes of pretty much every change in the repository.

- Danny

More information about the linux mailing list