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

Re: Git rescue mission

From
Jakub Narebski <jnareb@gmail.com>
Date
Feb 9, 2007, 00:03 UTC
Message-ID
<200702090103.05510.jnareb@gmail.com>
In-Reply-To
<17867.46325.433406.974582@lisa.zopyra.com>
Bill Lear wrote:
Show 18 quoted lines
> On Thursday, February 8, 2007 at 18:33:24 (-0500) Shawn O. Pearce writes:
>> Bill Lear <rael@zopyra.com> wrote:
>>>
>>> With regard to the new version and old repos, am I correct in assuming
>>> that we can upgrade our old repo (a bare one) to the new git by first
>>> installing the new git, and then doing this:
>>> 
>>> % cd /repos/git
>>> % mv project project.old_git
>>> % git --bare clone project.old_git project
>>> 
>>> or is there something else we must do?
>>
>> In the case of a bare repo, there isn't anything to do.
> 
> So, I assume I need to tell our developers that once we have installed
> the new git, they will need to set aside their old repos and just
> clone again from our company repo?
Nope.
1. New git works with old repositories, and would continue to work.
Nevertheless you need new layout and new configuration to make use
of some new features.
2. They need to clone _their own_ repositories. It's the simplest
way, but
3. You can simply
 a) convert remotes configuration from .git/remotes/origin file
    to .git/config using remotes2config.sh script in contrib area
    of git, or http://repo.or.cz/w/git.git?a=blob_plain;f=contrib/remotes2config.sh
 b) hand edit remotes configuration to use globbing for refspec,
    and per branch configuration

If old repository was _not_ cloned with --use-separate-remote (using separate remote layout), you would also have to:

 c) move branches from old layout to new layout using "git branch -m"
    command: 'refs/heads/origin' branch to 'refs/remotes/origin/master',
    all branches except 'master' (refs/heads/master) from 
    'refs/heads/<branch>' to 'refs/remotes/origin/<branch>'.
That's all. You have new layout and new configuration without re-cloning.
-- 
Jakub Narebski
Poland
Previous: Shawn O. PearceNext: Linus Torvalds
Message 45 of 51 in “Git rescue mission”
  1. Bill LearFeb 8, 2007
  2. Johannes SchindelinFeb 8, 2007
  3. Bill LearFeb 8, 2007
  4. Johannes SchindelinFeb 8, 2007
  5. Bill LearFeb 8, 2007
  6. Junio C HamanoFeb 8, 2007
  7. Alexander LitvinovFeb 8, 2007
  8. Junio C HamanoFeb 9, 2007
  9. Alexander LitvinovFeb 9, 2007
  10. Bill LearFeb 8, 2007
  11. Jakub NarebskiFeb 8, 2007
  12. Jeff KingFeb 8, 2007
  13. Bill LearFeb 8, 2007
  14. Linus TorvaldsFeb 8, 2007
  15. Kalle PokkiFeb 8, 2007
  16. Linus TorvaldsFeb 8, 2007
  17. Kalle PokkiFeb 8, 2007
  18. Shawn O. PearceFeb 8, 2007
  19. Theodore TsoFeb 9, 2007
  20. Shawn O. PearceFeb 9, 2007
  21. Jakub NarebskiFeb 9, 2007
  22. Theodore Ts'oFeb 10, 2007
  23. Print a sane error message if an alias expands to an invalid git commandTheodore Ts'o, Feb 10, 2007
  24. Allow aliases to expand to shell commandsTheodore Ts'o, Feb 10, 2007
  25. Linus TorvaldsFeb 10, 2007
  26. Theodore TsoFeb 10, 2007
  27. Johannes SchindelinFeb 10, 2007
  28. Theodore TsoFeb 11, 2007
  29. Johannes SchindelinFeb 11, 2007
  30. Theodore TsoFeb 11, 2007
  31. Johannes SchindelinFeb 11, 2007
  32. Junio C HamanoFeb 11, 2007
  33. Johannes SchindelinFeb 11, 2007
  34. Theodore TsoFeb 12, 2007
  35. Shawn O. PearceFeb 12, 2007
  36. Junio C HamanoFeb 10, 2007
  37. Kalle PokkiFeb 9, 2007
  38. Bill LearFeb 8, 2007
  39. Linus TorvaldsFeb 8, 2007
  40. Bill LearFeb 8, 2007
  41. Bill LearFeb 8, 2007
  42. Shawn O. PearceFeb 8, 2007
  43. Bill LearFeb 8, 2007
  44. Shawn O. PearceFeb 8, 2007
  45. Jakub NarebskiFeb 9, 2007
  46. Linus TorvaldsFeb 9, 2007
  47. Michael S. TsirkinFeb 9, 2007
  48. Jakub NarebskiFeb 8, 2007
  49. Linus TorvaldsFeb 8, 2007
  50. Junio C HamanoFeb 9, 2007
  51. Jakub NarebskiFeb 8, 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.