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

Document clone of clone loosing branches?

From
VHVaclav Hanzl <hanzl@noel.feld.cvut.cz>
Date
Jun 14, 2008, 13:05 UTC
Message-ID
<20080614.150548.71104932.hanzl@noel.feld.cvut.cz>

I wander whether man git-clone is correct when it says "creates remote-tracking branches for each branch in the cloned repository".

IMHO remote-tracking branches in the original repository _are_ branches and they are _not_ cloned (when using git-clone with no options) - maybe this is worth noting very explicitly?

When git newby like me converts a CVS repository, containing just few short old branches (stable release bug fixes) and then clones it around, with naive belief that clone is a 1:1 copy or something close, nasty surprise can happen:

 - converted repository has those branches, OK
 - clone of it also has them, but as a remote tracking branches
 - clone of clone has it as dangling objects only (can go away later)

Trying to play it safe, I used git-clone many times while starting with git, and I got really nervous when I first discovered that my old stable release bug fix branch is not visible in some repositories :-)

Is it just my failure to read those few hundred man pages carefully enough (I did my best :-) ), or something worth fixing in man git-clone and tutorials?

Regards,
Vaclav Hanzl
Next: Jeff King
Message 1 of 20 in “Document clone of clone loosing branches?”
  1. Vaclav HanzlJun 14, 2008
  2. Jeff KingJun 14, 2008
  3. Vaclav HanzlJun 14, 2008
  4. Jakub NarebskiJun 14, 2008
  5. Vaclav HanzlJun 14, 2008
  6. Jakub NarebskiJun 14, 2008
  7. Lea WiemannJun 14, 2008
  8. Vaclav HanzlJun 14, 2008
  9. Junio C HamanoJun 14, 2008
  10. Vaclav HanzlJun 15, 2008
  11. Jakub NarebskiJun 14, 2008
  12. Jakub NarebskiJun 15, 2008
  13. Documentation: Note about the meaning of "clone"Robin Rosenberg, Jun 15, 2008
  14. Jakub NarebskiJun 15, 2008
  15. Wincent ColaiutaJun 15, 2008
  16. Vaclav HanzlJun 15, 2008
  17. Vaclav HanzlJun 15, 2008
  18. Miklos VajnaJun 15, 2008
  19. Junio C HamanoJun 15, 2008
  20. PATCH] cvsimport: Clarification on the use of -rRobin Rosenberg, Jun 15, 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.