This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: git is live

On 10/22/2013 07:41 PM, Cary Coutant wrote:
>> The URLs:
>>     git://
>>     ssh://
> Thanks, Tom!
> Does anyone know if it's possible to switch my existing git repos
> (cloned from the old mirror at to the new
> one? Or is it best to clone from scratch?

What I did was first was:

  git add remote binutils-gdb ssh://

and then:

  git fetch binutils-gdb

But, git appeared to hang, making no progress.  It wouldn't even
start fetching.  stracing git, it looked like git was checking
if the existing remotes and the new remote share ancestry/commits,
a commit/rountrip at a time.  That'd take forever.  So what I
did next was:

Created a fresh clone from scratch:

  $ mkdir binutils-gdb
  $ cd binutils-gdb
  $ git clone ssh:// src

Then I went back to my old git repo checkout, and added a
remote pointing to the new local checkout:

  $ cd ../../my-old-git-repos-checkout-dir/src
  $ git remote add binutils-gdb /local/path/to/fresh/binutils-gdb/src
  $ git fetch binutils-gdb

Now the same "does the new remote share commits/ancentry"
process ended in seconds, because it was all local, and git
started fetching the new repo/remote in a matter of seconds.

So now I did:

  $ git remote set-url binutils-gdb ssh://

to reset the remote url back to the real remote url, rather than
the temporary clone directory.

Voila.  Then I did:

  $ git fetch binutils-gdb

once more, and that worked as expected.

>From there on, I've just been switching to by local
branches that were based on the old git mirror, and rebased
them on top of binutils-gdb/master.

I then renamed my "upstream" remote to "old-cvs-mirror",
and my "binutils-gdb" remote to "upstream".  :-)

Dunno if there's an easier way, but that worked nicely
for me, and it only took a few minutes.

Pedro Alves

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]