-1

Yesterday I pushed all my project files to a repo called my repo

Today, when I clone the repo on another computer it clones all files except one folder which name is something like event-calendar[2340sdfda0s]

Can you tell me how can I get all folders when I clone a repo?

Here is the repo screenshot:

Jimi
  • 1,605
  • 1
  • 16
  • 33
Shibbir
  • 1,963
  • 2
  • 25
  • 48

2 Answers2

0

From the screenshot it looks like Bitbucket sees that folder as a submodule. It could be due to wrong configuration in the Git repository or something else (from just a screenshot is really hard to tell). So you have two options here:

  • Reinitialize the repository and make sure that folder is not added as submodule

  • Clone the repo with git clone --recurse-submodules my/repo/origin

But I prefer the first solution since chances are this behavior is not intended

Jimi
  • 1,605
  • 1
  • 16
  • 33
  • you mean, I need to clone the repo with : git clone --resource-submodules git@bitbucket.org:xxx/xxx.git – Shibbir Feb 21 '20 at 08:38
  • No, the general command is exactly what I wrote in the answer, you just need to replace `my/repo/origin` with your actual git repository URL. But if you have a submodule in your repository but no `.gitmodules` file, then you really should check out what is going on... – Jimi Feb 21 '20 at 09:02
0

This folder is a submodule.

You should see a .gitmodules file under your root.
You can delete the current folder and clone it again or use the commands below to update your submodule:

Cloning a repository with submodules

If you want to clone a repository including its submodules you can use the --recursive parameter.

# Cloning a repository with submodules
git clone --recursive <url>

Update submodules after clone

git submodule init
git submodule update

# Or
git submodule update --init submoduleName

Fetch and checkout any nested submodules

git submodule update --init --recursive

To view submodule status

git submodule status

As you can see in the image below, a submodule is simply a sub-project inside your project.

enter image description here

Community
  • 1
  • 1
CodeWizard
  • 128,036
  • 21
  • 144
  • 167