Can `shallow_clone=True` work with Git submodule?

lb.thanh's Avatar

lb.thanh

28 Jun, 2019 08:06 AM

Hi,

My project need to clone submodule for build.
When I enabled shallow_clone=True, I got below error

git submodule update --init --recursive
fatal: not a git repository (or any of the parent directories): .git
Command exited with code 128
Build failed

I want to confirm that shallow_clone can associate with Git submodule or not?
Warm regards,
Thanh

  1. 1 Posted by lb.thanh on 28 Jun, 2019 08:43 AM

    lb.thanh's Avatar

    If this downloaded the zip file, so there is no .git folder as error message

  2. Support Staff 2 Posted by Owen McDonnell on 28 Jun, 2019 03:26 PM

    Owen McDonnell's Avatar

    You are correct that this will not work... and furthermore, GitHub doesn't include submodules in repo zip packages.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac