gitbitbucketatlassian-sourcetreeliferay-6.2

Cloning two bitbucket repo into a same folder


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


Solution

  • But now when I tried to pull the repo two contents onto the same liferay-sdk folder it is giving me Folder 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:

    That would remain true even if you were using submodules.

    Instead, you could: