I have some code in a Git repository that needs to be synchronized with a SVN repository. My recipe looks like this:
- Create a SVN repository (local, for testing, will be a remote one).
- Create initial layout, commit 1 revision
git svn clone -T '/trunk' <REPO>a new Git repository based on the initial commit.git remote add dev <ORIGINAL>followed by agit pull dev <ORIGINAL_BRANCH>. Now I have my master branch in the repository based on the initial SVN commit.git svn rebasewhich would be followed bydcommit.
Step 5) however fails with:
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
Auto-merging X
Applying: Y
Applying: Z
Using index info to reconstruct a base tree...
<stdin>:269: trailing whitespace.
<stdin>:315: trailing whitespace.
<stdin>:400: trailing whitespace.
* Method 2.6. Returns zero or two elements
<stdin>:3762: trailing whitespace.
warning: 4 lines add whitespace errors.
Falling back to patching base and 3-way merge...
Followed by a couple of “Auto-merging” and “CONFLICT (content)” messages the rebase finally halts with a friendly “Failed to merge in the changes”. Is there anything I can do to have these conflicts resolved automatically? I do not even understand how conflicts can occur when rebasing!
I am giving up and use
set-treeinstead. Agit rebase -presults in a history with the artificial git-svn initial commit at root, followed by the initial commit from the original Git repository…For completeness my references for the three approaches tried:
git rebasegit svn rebaseset-tree