我想将两个现有项目添加到单个 git 存储库中。我已经将一个项目添加到存储库中,现在我想添加第二个项目而不影响第一个项目
答案1
有一个通过--orphan
分支的选项。即手册:
--orphan
Create a new orphan branch, named <new_branch>, started from
<start_point> and switch to it. The first commit made on this new
branch will have no parents and it will be the root of a new history
totally disconnected from all the other branches and commits.