Subject: Re: Git rescue mission

From: Jakub Narebski <[email-masked]>
Date: Fri, 09 Feb 2007 00:38:21 +0100

<opublikowany i wysłany>

Bill Lear wrote:

> On Thursday, February 8, 2007 at 14:13:47 (-0800) Linus Torvalds writes:
>>...
>> It's one of the bigger UI warts that got fixed since the last release 
>> (although it got fixed by better config management, and as such you'll 
>> only *see* the fixes if you end up doing the initial clone with the new 
>> git version - if you use a new git version with an old repo, many - but 
>> not all - bad semantics will remain).
>> ...
> 
> 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

  % git clone --bare project.old_git project

although usually notation project.git is used, so I think it would be

  % git clone --bare project.old_git project.git

"git --bare <cmd>" is equivalent to "git --git-dir=pwd". You want to make
bare clone "git clone --bare", not invoke git command in bare repository
"git --bare <cmd>": there is no repository yet!

You can just edit .git/config (prehaps generate it first
from .git/remotes/origin file using remotes2config.sh script from contrib
section), and move (rename) branches.

-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git