repo1 repo2是两个无关联的仓库,需要合并并保留两者的提交历史
git checkout repo1 repo1/master
git checkout repo2 repo2/master
git merge repo1
直接尝试合并时会报错
fatal: refusing to merge unrelated histories
git merge repo1 --allow-unrelated-histories
CONFLICT (add/add): Merge conflict in README.md Auto-merging README.md Automatic merge failed; fix conflicts and then commit the result.
修改处理好文件冲突内容后,将文件冲突标记为已解决