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

Re: Did I miss something? git-clone doesn't grab all branches????

From
Junio C Hamano <junkio@cox.net>
Date
Mar 31, 2007, 01:30 UTC
Message-ID
<7v1wj6yzbp.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<460D42FE.1080703@freescale.com>
Timur Tabi <timur@freescale.com> writes:
Show 5 quoted lines
> In the past, my clone of paulus/powerpc.git contained everything.
> Every time I did a git-pull, it would grab everything.  Then I could
> do a local clone/checkout if I ever wanted to work on a branch (like
> for-2.6.22).  I didn't have to know the names of the branches when I
> did git-clone.

If that is how you use multiple trees, I think you can make that "My central repository which is a mirror of Paulus" a bare repository clone; keep updating it with git-fetch instead as a bare repository does not have an associated working tree.

	( setup )
	$ git clone --bare git://git.kernel.org/.../ paulus-mirror.git
	( periodical mirror update from upstream )
        $ cd paulus-mirror.git && git fetch
	( forking off your play area )
	$ git clone -l -s paulus-mirror.git foobranch.git
        $ cd foobranch.git
        $ git checkout --track -b foobranch origin/foobranch
	$ hack hack
	( after mirror update )
        $ cd foobranch.git
        $ git pull ;# this pulls from your mirror
Previous: Timur Tabi
Message 4 of 4 in “Did I miss something? git-clone doesn't grab all branches????”
  1. Timur TabiMar 30, 2007
  2. Loeliger Jon-LOELIGERMar 30, 2007
  3. Timur TabiMar 30, 2007
  4. Junio C HamanoMar 31, 2007

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.