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

[Solved] How can I access remote branches in a cloned repository on my local machine?

From
EOErich Ocean <erich@atlasocean.com>
Date
Oct 20, 2007, 14:18 UTC
Message-ID
<20CAFC3D-7684-480D-B340-C3206BA08DE5@atlasocean.com>
In-Reply-To
<Pine.LNX.4.64.0710201455540.8248@beast.quantumfyre.co.uk>
Per Julian Phillips' suggestion:
 > logan-2:~ ocean$ cd commiters/
 > logan-2:~/commiters ocean$ git config remote.origin.fetch +refs/ 
remotes/*:refs/remotes/*
 > logan-2:~/commiters ocean$ git fetch
 > git@git.1kstudios.lan's password:
 > * refs/remotes/eocean/master: storing remote branch 'eocean/ 
master' of git@git.1kstudios.lan:dev
 >   commit: 06b4b2e
 > * refs/remotes/gt/master: storing remote branch 'gt/master' of  
git@git.1kstudios.lan:dev
 >   commit: 889a585
 > * refs/remotes/jchumley/master: storing remote branch 'jchumley/ 
master' of git@git.1kstudios.lan:dev
 >   commit: 18cead3
 > logan-2:~/commiters ocean$ git branch
 >   +refs/remotes/eocean/master
 >   +refs/remotes/gt/master
 >   +refs/remotes/jchumley/master
 > * master
 > logan-2:~/commiters ocean$ git checkout  +refs/remotes/jchumley/ 
master
 > Switched to branch "+refs/remotes/jchumley/master"
Best, Erich
On Oct 20, 2007, at 6:56 AM, Julian Phillips wrote:
Show 34 quoted lines
> On Sat, 20 Oct 2007, Julian Phillips wrote:
>
>>>  The problem is, when I clone git@git.1kstudios.lan:dev, the various
>>>  <username>/master's aren't there. I have tried a bunch of  
>>> different ways,
>>>  but they all give me errors. For example:
>>
>> The default fetch refspec doesn't include the remotes - after all,  
>> you normally don't want the origin for your origin ...
>>
>>>  How can I access remote branches in a cloned repository on my local
>>>  machine?
>>
>> Try something like:
>>
>> git config remote.origin.fetch +refs/remotes/*:+refs/remotes/*
>
> sorry, that should have been:
> git config remote.origin.fetch +refs/remotes/*:refs/remotes/*
>
>> git fetch
>
> -- 
> Julian
>
>  ---
> "The National Association of Theater Concessionaires reported that in
> 1986, 60% of all candy sold in movie theaters was sold to Roger  
> Ebert."
> 		-- D. Letterman
> -
> 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: Julian PhillipsNext: Jan Hudec
Message 4 of 5 in “How can I access remote branches in a cloned repository on my local machine?”
  1. Erich OceanOct 20, 2007
  2. Julian PhillipsOct 20, 2007
  3. Julian PhillipsOct 20, 2007
  4. [Solved] How can I access remote branches in a cloned repository on my local machine?Erich Ocean, Oct 20, 2007
  5. Jan HudecOct 20, 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.