I’m trying a
git rebase --onto master myremote/master~21 myremote/master
to add the latest 21 commits from a remote repository on mine.
What git tells me is that there’s a conflict — but how’s that possible?
In my understanding it’s just taking that 21 commits and applying them on top of my master. How can there be conflicts?
Thanks for help!
I’m doing that btw because somehow I messed up my git-svn repository (the remote), and there’s 21 commits which I don’t manage to commit to subversion. So I’m trying with a fresh git-svn clone, in which I’m adding those 21 commits.
There is conflict if:
myremote/master.myremote/mastercommits.If somehow the fresh
git-svn clonehas different SHA1 than the previous git-svn repo, then there is no close common ancestors, and the chances of conflicts are that much higher.See “How to identify conflicting commits by hash during git rebase?” for illustrations of conflicts during a rebase.
One way to reset your local master to myremote/master would be to:
If you hadn’t made any changes in your local
masterbefore fetchingmyremote/master, this should work.