git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Selectively clone Git submodules -- a useful feature?

From
Stefan Beller <sbeller@google.com>
Date
Mar 16, 2016, 20:47 UTC
Message-ID
<CAGZ79kbu0JHbk8_CeY+2hDATMJ_QkYBhMbyh78jqKyf+h+vpdA@mail.gmail.com>
In-Reply-To
<162A5ADF-1FDD-432B-B5F8-672DF5B50EEC@gmail.com>

On Thu, Jun 18, 2015 at 1:55 PM, Lars Schneider <larsxschneider@gmail.com> wrote:

> Hi,
Hi,
sorry for a real late answer to this,
Show 18 quoted lines
>
> AFAIK Git has two ways to clone a repository with respect to submodules:
>
> (1) Plain clone of just the repository itself:
> git clone git://github.com/foo/bar.git
>
> (2) Recursive clone of the repository including all its submodules:
> git clone --recursive git://github.com/foo/bar.git
>
> I am working on a big cross platform project and on certain platforms I don't need certain submodules. AFAIK there is no way to selectively clone only a subset of the submodules with the standard command line interface. I wonder if something like an exclude pattern for submodules would be of general interest. I imagine a call like this after a plain "clone" operation:
>
> git submodule update --init --recursive --exclude 3rdParty/Windows/*
>
> or even:
>
> git clone --recursive --exclude 3rdParty/Windows/* git://github.com/foo/bar.git
>
> Please let me know what you think.

I am looking forward for exactly that feature, I even proposed exactly this (in form of RFC patches, see http://thread.gmane.org/gmane.comp.version-control.git/281670)

I plan on reviving this soon. Did you solve this problem as Jens proposed or are you still looking for a solution?

Thanks, Stefan

Show 17 quoted lines
>
>
> Thanks,
> Lars
>
>
> PS: I posted this question already on the Google Git group here:
> https://groups.google.com/forum/?fromgroups=#!topic/git-users/jyKsd45d2MA
>
> I am sorry, but I discovered this mailing list afterwards and I am not sure which one is the appropriate one. Please advise.
>
>
> ---
> https://larsxschneider.github.io/--
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous: Jens Lehmann
Message 3 of 3 in “Selectively clone Git submodules -- a useful feature?”
  1. Lars SchneiderJun 18, 2015
  2. Jens LehmannJun 19, 2015
  3. Stefan BellerMar 16, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.