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.