1

How can i repair my git-svn mirror repository? It is set up with git svn init ..., then github remote was added. The cron job is doing git svn rebase && git push periodically.

Everything was fine until upstream somehow "uncommited" several revisions from svn, which already was fetched into my git-svn and pushed to github. Then upstream added some new revisions to svn trunk, reusing revision numbers of "uncommited" revisions, which broke my syncronization process.

When i realized what hppened, i did git svn reset to last valid revision and commited reverse patch into git.

But since then, i can not pull upstream changes with git svn rebase, i have to do git svn fetch && git merge trunk instead, resulting in awful history.

Can i somehow tell git-svn that i will not git svn dcommit anything, that it can forget about that reverse patch commit, so git svn rebase can work like it worked before all this happened?

Vasily Redkin
  • 584
  • 1
  • 3
  • 17

1 Answers1

0

My investigation results: there is nothing magical in git-svn's rebase function. It is just a git svn fetch followed by git rebase refs/remotes/trunk and refs update. In my case, all i had was to move my local tracking branch ref to the last fetched from commit.

git svn fetch
git log -1 refs/remotes/trunk

gave me latest sha1: ed0fa874ca872bc3a0101ee397f611a537e72c2a

git update-ref HEAD ed0fa87
git reset --hard

Useful resources: Pro GIT Book, Visualizing branch topology in git.

Hope, this will help someone.

Community
  • 1
  • 1
Vasily Redkin
  • 584
  • 1
  • 3
  • 17