Hi, I did myself a big oopsie at the start of my project and I can’t quite figure out the best way to fix it. I was working on the React capstone project, and at the start I created a separate git for a sub-directory (accidentally called git init in it and continued using it) and tried to combine it into the main as a submodule.
I then uploaded the repository on Github here and then tried to connect it to Netlify and get the error log below.
8:42:20 PM: Build ready to start
8:42:21 PM: build-image version: 2cee85eb7f808bf3b6e87378c5307f9411f0a332
8:42:21 PM: build-image tag: v3.8.0
8:42:21 PM: buildbot version: 95e0a40ce76370df2af854ecde359a48e4e439ab
8:42:22 PM: Fetching cached dependencies
8:42:22 PM: Failed to fetch cache, continuing with build
8:42:22 PM: Starting to prepare the repo for build
8:42:22 PM: No cached dependencies found. Cloning fresh repo
8:42:22 PM: git clone https://github.com/innoc3ntt/jammming
8:42:24 PM: Preparing Git Reference refs/heads/main
8:42:25 PM: Error checking out submodules: warning: could not look up configuration ‘remote.origin.url’. Assuming this repository is its own authoritative upstream.Submodule ‘Components’ (/opt/build/repo/src/Components) registered for path 'Components’fatal: No url found for submodule path ‘src/Components’ in .gitmodules
8:42:25 PM: Creating deploy upload records
8:42:25 PM: Failing build: Failed to prepare repo
8:42:25 PM: Failed during stage ‘preparing repo’: Error checking out submodules: warning: could not look up configuration ‘remote.origin.url’. Assuming this repository is its own authoritative upstream.Submodule ‘Components’ (/opt/build/repo/src/Components) registered for path 'Components’fatal: No url found for submodule path ‘src/Components’ in .gitmodules: exit status 128
8:42:25 PM: Finished processing build request in 3.503422468s
I found this on stackOverflow and typed the commands in CLI and ended up deleting my local copy but have restored it.
I’m a bit stuck and not sure how to merge this second git repo in the sub-directory into the parent directory. I’m not that experienced with Git so kinda got myself into a bit of a pickle and hoping someone can advise me.
Here is the git config info if it’s helpful
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
ignorecase = true
- [submodule “Components”]
url = C:/Users/****/jammming/src/Components
active = true