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

Re: how to clone/checkout branch/tag vesion from GIT repository

From
Jeff King <peff@peff.net>
Date
May 11, 2012, 17:22 UTC
Message-ID
<20120511172214.GC26916@sigill.intra.peff.net>
In-Reply-To
<1336740319206-7550370.post@n2.nabble.com>
On Fri, May 11, 2012 at 05:45:19AM -0700, supadhyay wrote:
Show 13 quoted lines
> branch - br6-1-0 is already exists on remote. I have my few data which are
> associated on this branch and I want to get that specific data from br6-1-0.
> 
> I did cvs2git and its working fine without any issue. 
> 
> Also I can see the  list of branches when I run "git branch -r"  on my
> GITserver through "git" user. But after did this migration I do clone from
> git to gitolite on the same server (to manage with user functionality). Now,
> after cloning to gitolite if I run "git branch -r" it shows only master.
> 
> I follow belwo step
> 1- cvs 2 git  >> I can see list of branches here 
> 2- git 2 gitolite  >> I can not see any branch except master.

How did you do the clone? A regular "clone" will clone only local branches of the remote repository (so if B fetches from A, and C fetches from B, C will not bother with A's branches).

If you are trying to clone the repository to act as a server repository in gitolite, I think you would want to use "git clone --mirror". This will omit the working tree (which you should not need for the server end), and will fetch all branches (exactly mirroring the state of the original repository).

-Peff
Previous: supadhyayNext: supadhyay
Message 6 of 9 in “how to clone/checkout branch/tag vesion from GIT repository”
  1. supadhyayMay 10, 2012
  2. Jeff KingMay 10, 2012
  3. Suchi UpadhyayMay 10, 2012
  4. Jeff KingMay 10, 2012
  5. supadhyayMay 11, 2012
  6. Jeff KingMay 11, 2012
  7. supadhyayMay 12, 2012
  8. supadhyayMay 14, 2012
  9. Jeff KingMay 14, 2012

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.