How to recover from an unwanted rename using git-svn: "Transaction is out of date"

Removing .git/svn did not work for me. Instead, here's how I resolved:

  • Deleted the offending directories from the repository (But I'm not sure that this is necessary. In hindsight I think I could have skipped this step)
  • git svn rebase
  • During the rebase, there were some conflicts. For each conflict, I resolved the conflicts in text editor, then used git add <file-in-conflict> and then git rebase --continue
  • After rebase completed successfully, git svn dcommit ran successfully!

I can't claim to understand what's really going on under the hood in git-svn in this case (although the underlying SVN issue makes perfect sense). My usual strategy when git-svn gets confused somehow is to blow away the .git/svn metadata directory (as in this post). This almost always saves me from odd synchronization issues between the git and SVN repositories.

Tags:

Git Svn