Having the Project which is having around 133 commits in November I had cloned the project and created a new repo before 50 commits that means:
A----B----C----D----E
Cloned New Repo from C
\__ C
Now there are about 15-20 commits in the new repo, but no commit is pushed to old repo but while coding many files and internally changed.
A----B----C----D----E
Cloned New Repo from C
\__ C----C1----C2---C3---C4
Now I want to merge these two repo into one as:
A----B----C----D----E----C1----C2---C3---C4
After searching internet got some commands and tried to do merging with following:
git --git-dir=../<some directory>/.git|
format-patch -k -15 --ignore-space-at-eol --stdout <commit SHA>|
git am -k -3
It gives the confilts with First commit and had sucessfully resolved it :
git mergetool
gm am --continue
shows an error:
Did you hand edit your patch?
It does not apply to blobs recorded in its index.
Cannot fall back to three-way merge.
Patch failed at 0002 XXXXXXX
The copy of the patch that failed is found in:
/xxxxxx/.git/rebase-apply/patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".