将两个 bitbucket repo 克隆到同一个文件夹中
Cloning two bitbucket repo into a same folder
我有两个 bitbucket 存储库,其中第一个存储库包含所有 Liferay 相关的 sdk,第二个存储库仅包含项目(有四个文件夹,例如 hooks、portlets、layoutpl、themes)。
我克隆了第一个包含 SDK 的 repo,假设文件夹名称是 liferay-sdk。现在转到需要 hooks、portlets、layoutpl、[=22= 的同一个 liferay-sdk ]themes 个文件夹,在 repo 2.
但是现在当我试图将 repo 的两个内容拉到同一个 liferay-sdk 文件夹时,它给我的文件夹不为空。
我正在使用源代码树。
注意:我只需要 hooks、portlets、layoutpl[=38= 所需的提交和推送权限], themes 在源代码树中而不是 liferay-sdk 中的其他东西。我们怎么能忽略 expect hooks, portlets, layoutpl, themes 在 liferay-sdk
谁能告诉我一些解决方案
But now when I tried to pull the repo two contents onto the same liferay-sdk
folder it is giving me Folder not empty
.
是的,您不能使用现有的 non-empty 文件夹克隆存储库。
您可以在第一个存储库中克隆第二个存储库:
cd liferay
git clone /url/second_repo
但这会给你:
- 一个嵌套的 git 回购(意味着
liferay-sdk
至少会记录一个 gitlink
, special entry in the parent repo)
- 一个嵌套的子文件夹(意思是 hook 不直接在
liferay-sdk
下,而是在 liferay-sdk/second_repo/hooks
中)
即使您使用的是子模块,这仍然是正确的。
相反,您可以:
- 在别处克隆第二个 repo
- 为您想要的四个文件夹直接在
liferay-sdk
到 second_repo/xxx
(hooks
, 等等).
- 将这些符号链接文件夹名称(例如
hooks
)添加到您的 liferay-sdk
.gitignore
文件中。
我有两个 bitbucket 存储库,其中第一个存储库包含所有 Liferay 相关的 sdk,第二个存储库仅包含项目(有四个文件夹,例如 hooks、portlets、layoutpl、themes)。
我克隆了第一个包含 SDK 的 repo,假设文件夹名称是 liferay-sdk。现在转到需要 hooks、portlets、layoutpl、[=22= 的同一个 liferay-sdk ]themes 个文件夹,在 repo 2.
但是现在当我试图将 repo 的两个内容拉到同一个 liferay-sdk 文件夹时,它给我的文件夹不为空。
我正在使用源代码树。
注意:我只需要 hooks、portlets、layoutpl[=38= 所需的提交和推送权限], themes 在源代码树中而不是 liferay-sdk 中的其他东西。我们怎么能忽略 expect hooks, portlets, layoutpl, themes 在 liferay-sdk
谁能告诉我一些解决方案
But now when I tried to pull the repo two contents onto the same
liferay-sdk
folder it is giving meFolder not empty
.
是的,您不能使用现有的 non-empty 文件夹克隆存储库。
您可以在第一个存储库中克隆第二个存储库:
cd liferay
git clone /url/second_repo
但这会给你:
- 一个嵌套的 git 回购(意味着
liferay-sdk
至少会记录一个gitlink
, special entry in the parent repo) - 一个嵌套的子文件夹(意思是 hook 不直接在
liferay-sdk
下,而是在liferay-sdk/second_repo/hooks
中)
即使您使用的是子模块,这仍然是正确的。
相反,您可以:
- 在别处克隆第二个 repo
- 为您想要的四个文件夹直接在
liferay-sdk
到second_repo/xxx
(hooks
, 等等). - 将这些符号链接文件夹名称(例如
hooks
)添加到您的liferay-sdk
.gitignore
文件中。