I have the following situation with my upstream svn repository:
I created the svn branch and worked a bit on it, which led to a really confusing story. So I deleted it again, retaining git commits, which allowed me to clear the history well.
As soon as I had the finished patch series, I set aside my branch using svn copy and then git svn fetch . The idea was that I would then reinstall the cleared story onto a new svn branch so that I can easily publish it using git svn dcommit .
However, git svn fetch did not do what I expected. This is what I expected (fake git log --oneline --decorate --graph output):
* xxxxxxx (svn-branch) * xxxxxxx (svn-parent-branch) ... somewhere further down, unrelated to the above * xxxxxxx (old-svn-branch-head)
But this is what I got:
* xxxxxxx (svn-branch) |\ | * xxxxxxx (svn-parent-branch) | * xxxxxxx (old-svn-branch-head)
As you can see, git svn fetch completely ignored the fact that the svn branch was removed, matching the recreation of svn with the merge commit in git . Now I wouldn’t bother about it if it didn’t matter, but, unfortunately, the wrong connection confuses git merging algorithms, creating conflicts with fictitious merging when a new database commit is reloaded.
So my question is: how can I lure git svn fetch so that I don't associate the new transaction with the database with the wrong parent or somehow fix my git repository so that I can still publish my stuff with git svn dcommit ? Of course, I can always delete all this again and create a new svn branch with a different name, but I was wondering if a better solution exists.
source share