Consider the following scenario: - an upstream repository with 2500 is stored in SVN - git user A imports the repository in git and makes 1 patch - git user B imports the repository in git and makes 1 patch - git user A wants to merge the patch from git of user B
In this case, if user A uses git merge, then the git history will be polluted using shared svn commits (i.e. instead of 2502 commits, the history will contain 2501 + 2501 = 5002 commits!)
If user A uses git rebasethen git history will be correct (2502 commits). This works fine in this simple scenario, but if user A and user B do not have 1, but 1000 commits each, a strange complication arises: git rebase -Xoursit crashes with the following message:
First, rewinding head to replay your work on top of it...
fatal: Could not parse object '98d7cd83de321e737b22240752cd178622d29406^'
Unknown exit code (128) from command: git-merge-recursive 98d7cd83de321e737b22240752cd178622d29406^ -- HEAD 98d7cd83de321e737b22240752cd178622d29406
You can, for example, reproduce this problem using the following github repositories:
git clone https://github.com/opentk/opentk
cd opentk
git remote add mono https://github.com/mono/opentk
git fetch mono
git checkout -b integrate
git rebase -Xours mono/rodo-consolidate-opentk
Does anyone know why this is happening? Any ideas how to solve this problem?
source
share