Fatal error when using Bitbucket as repository

My PX4-Autopilot is cloned from Stable Release v1.12.3 · PX4/PX4-Autopilot (GitHub](Release Stable Release v1.12.3 · PX4/PX4-Autopilot · GitHub)

I am using the following tools:
Ubuntu 18.04
python 3

I am using the following commands to build:
make px4_fmu-v5_default clean && make px4_fmu-v5_default

I created a BitBucket Repo using the cloned code. I set my remote repository to my bitbucket repo (https://bitbucket.org/).

When build, I get the following error:
fatal: not a git repository: /home/coop/PX4-Autopilot/platforms/nuttx/NuttX/nuttx/…/…/…/…/.git/modules/platforms/nuttx/NuttX/nuttx

The .git folder does not have a modules folder. Looking at the original cloned PX4-Autopilot V1.12.3, it DOES have a modules folder. The .git folder is not in my BitBucket repository (apparently command “git add .” does not add it).

Anyone else having this problem ?