2015-09-28 104 views
3

我想将多个项目添加到Bitbucket中的单个存储库中,但在提交后,当我推送到原始主数据时,它只是添加了空文件夹。没有添加子文件夹和文件。我按照下面的步骤,如何将多个项目添加到Bitbucket中的单个存储库中?

  1. 从主文件夹,git init
  2. git remote add origin gitrepository
  3. git add --all
  4. git commit -m "initial commit"
  5. git push -u origin master

回答

3

如果这些项目文件夹本身是这将发生nested git repos

在这种情况下,这些嵌套式回购的内容将被忽略:看“How to commit a git repo into a git repo (not submodule)”。

您可以尝试和“merge nested git repo into parent repo, retaining history”。

或者你可以声明那些嵌套回购作为子模块。
(如在“Creating Git Submodules out of existing repository and reflecting parent changes to the child repository”中)

相关问题