git svn rebase conflicts

Hi we are doing one way synchronisation from svn to git. We are following some steps by searching through the internet. Developers commit code to the svn. We need to synch all the changes to Git from svn. No one commits to git and the git branch is empty initially. We are using git-svn to do this process.

the steps are:

1) git svn clone

2) git add remote origin

3) git pull

4) git push

Upto here everything is fine and no issues.

Now we want to push the new changes from svn to git. Then we do

git svn rebase

it is showing conflicts. We don't want to do resolve conflicts manually. Whatever committed to svn should be pushed to git. Please help us is there any other way that it can push changes from svn to git without conflicts means auto merge from svn because we want to do this process automate.

And also if there are any particular steps do we need to follow to work the sync without any conflicts.

Thank You.

1 Answer

  1. Jackson- Reply

    2019-11-14

    In case you are ready to completely ignore whatever happens on the git side, you could do the following sequence:

    fetch latest from svn

    git svn fetch
    

    assuming you want to push svn/trunk to origin/master

    -f forces the current state of svn/trunk to override whatever sits at the remote side

    git push -f origin svn/trunk:master
    

Leave a Reply

Your email address will not be published. Required fields are marked *

You can use these HTML tags and attributes <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>