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

Re: git newbie - cloning / check out help

From
Petr Baudis <pasky@suse.cz>
Date
Jul 24, 2008, 23:15 UTC
Message-ID
<20080724231531.GS32184@machine.or.cz>
In-Reply-To
<loom.20080724T211609-298@post.gmane.org>
  Hi,
On Thu, Jul 24, 2008 at 09:24:34PM +0000, Donald Brady wrote:
Show 18 quoted lines
> I am just ramping up on git and have the following scenario / issue:
> 
>   I have a git repository on server A.
> 
>   I clone it onto my machine B.
> 
>   In my local copy/repository on machine B I clone a repository on some 
> third party server C.
> 
>   I commit my changes into B and push them to A.
> 
>   Now if I clone my repository from Server A onto my local machine
>  in a different location I see all the source as normal but only the top
>  level directory of C. Any source under that is not present. 
> 
> What is the magic git incantation to make sure that I check out 
> not only the code from my repository but  any repositories that
> are cloned into it (recursive clone?)
  we call this functionality "submodules" and the quickstart howto is:
	You have git repository on A
	You clone it onto your machine B
	git submodule add url directoryC
	You commit your changes into B and push them to A
	You do another clone of A and then within the clone
	git submodule update --init
For further details, see git-submodule(1).
-- 
				Petr "Pasky" Baudis
As in certain cults it is possible to kill a process if you know
its true name.  -- Ken Thompson and Dennis M. Ritchie
Previous: Donald BradyNext: Donald Brady
Message 2 of 3 in “git newbie - cloning / check out help”
  1. Donald BradyJul 24, 2008
  2. Petr BaudisJul 24, 2008
  3. Donald BradyJul 24, 2008

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.