I am trying to merge two git repository into single one and I have followed following tutorial http://jasonkarns.com/blog/merge-two-git-repositories-into-one/ . I am successfully able to merge the repository with master branch, but when I am merging two repo with (master and develop) branch and when I am running command
git read-tree --prefix=<project-name>/ -u <project-name>/develop
$git read-tree --prefix=first/ -u first/develop
error: Entry 'first/first' overlaps with 'first/first'. Cannot bind.
I have executed command in following pattern,
# merge project A into subdirectory A [for master branch]
git remote add -f first ../first
git merge -s ours --no-commit first/master
git read-tree --prefix=first/ -u first/master
git commit -am "merging projectA master branch into subdirectory A"
# for develop branch
git checkout -b develop
git merge -s ours --no-commit first/develop
git read-tree --prefix=first/ -u first/develop
git commit -am "merging prjectA development branch into subdirectory A"
I am not sure whether I should run read-tree
for development branch or not.
I've seen the problem that you've described in the past, the error is pretty reoccuring.
git read-tree --prefix=path -u project
error: Entry 'path/file' overlaps with 'path/file'. Cannot bind.
In related questions they suggest to use the read-tree function to solve this.
I'd suggest you to look at How do I add/upgrade/downgrade a remote Git project in my repository without using submodules? which might help you out.
Best of luck
-Ricardo
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.