繁体   English   中英

在将许多git仓库合并到一个保存其历史记录的同时发生绑定错误

[英]binding error while merging many git repository into one preserving their histories

我正在尝试将两个git存储库合并为一个,然后遵循以下教程http://jasonkarns.com/blog/merge-two-git-repositories-into-one/ 我能够成功地将存储库与master分支合并,但是当我将两个repo与(master and development)分支合并时以及运行命令时

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.

我已经按照以下模式执行了命令,

# 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"

我不确定是否应该为开发分支运行read-tree

我已经看到了您过去描述的问题,该错误再次发生。

git read-tree --prefix=path -u project
error: Entry 'path/file' overlaps with 'path/file'.  Cannot bind.

在相关问题中,他们建议使用读取树函数来解决此问题。

我建议您看看如何在不使用子模块的情况下在存储库中添加/升级​​/降级远程Git项目? 这可能会帮助您。

祝你好运

-里卡多

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM