I have two bitbucket repo in which the first repo contains all the Liferay related sdk, the second repo contains only the projects(have four folder such as hooks, portlets, layoutpl, themes).
I took the clone of the first repo which contains the SDK, lets say the folder name is liferay-sdk. now on to the same liferay-sdk in need hooks, portlets, layoutpl, themes folders which are in repo two.
But now when I tried to pull the repo two contents onto the same liferay-sdk folder it is giving me Folder not empty.
I am using Source Tree.
Note: I need commit and push privilege needed only to hooks, portlets, layoutpl, themes in source tree and not to the other things in liferay-sdk. How can we ignore things expect hooks, portlets, layoutpl, themes in liferay-sdk
Can anyone please tell me some solution for this
But now when I tried to pull the repo two contents onto the same
liferay-sdk
folder it is giving meFolder not empty
.
Yes, you cannot clone a repo using a existing non-empty folder.
You could clone the second repo within the first:
cd liferay
git clone /url/second_repo
But that would give you:
liferay-sdk
would at minimum record a gitlink
, special entry in the parent repo)liferay-sdk
, but rather in liferay-sdk/second_repo/hooks
)That would remain true even if you were using submodules.
Instead, you could:
ln -s
or mklink /J
on Windows) for the four folders you want directly under liferay-sdk
to second_repo/xxx
(hooks
, etc).hooks
) to your liferay-sdk
.gitignore
file.