return to OCLUG Web Site
A Django site.
October 24, 2008

Bart Trojanowski
Bart's Blog
» git-svn strangeness

As awesome as git-svn is, I had it fail today with this message:

    Last fetched revision of refs/remotes/branches/foo was r19307, but we are about to fetch: r19307!

To which I said: "WTF?". I still don't know what it means, but I can share with you how I recovered it.

It turns out that git-svn is quite capable of recovering from this. You just have to remove its meta-data for the offending branch, and resync with SVN.

    rm -f .git/svn/branches/foo/.rev_*
    git svn fetch

I actually had multiple branches in this bad state -- but not all of them -- and I had to repeat it for all those that it complained about.

UPDATE: I upgraded to git v1.6.0.2 and the problem went away.

March 4, 2008

Bart Trojanowski
Bart's Blog
» how to track multiple svn branches in git

I must say that I am no fan SVN, but SVN and I get a long a lot better since I started using git-svn. Long ago a good friend of mine, Dave O'Neill, taught me how to handle multiple branches using git-svn. I had used that technique until Dave taught me how to do it better.

Recently I saw this blog post which referenced Dave's article talking about the first method. I guess Dave never got around to updating his blog with the better way. So I am going to do that here:

[Read More]