On Tue, Sep 27, 2011 at 10:18 PM, David Aguilar <dav...@gmail.com> wrote:

> On Sep 27, 2011, at 6:30 PM, Godmar Back <god...@gmail.com> wrote:
>
>
> Hi,
>
> I'm trying to migrate from CVS to git. To that end, I'm trying to use the
> 'git cvsimport' command to import an existing CVS repository into a remote
> bare git repository I've created.
>
> I have set up the git repository using 'git init --bare repos.git' and I
> have verified that I can clone this (empty) repository over an ssh
> transport. I have set up ssh public key authentication successfully.
>
> However, when I try to import the CVS repository into the remote repository
> using:
>
> git cvsimport -i -r git@mygithost:.git -v -d :pserver:.... reposname
>
>
> I think the error is because you are trying to tell it to use the remote
> repo, which is not how it works.
>
> the remote -r flag is best omitted for this use case (one-time conversion)
>
> create a new local repo and do it there:
>
> git cvsimport -C newrepo  ...
>
> then push it to your shared repo
>
> cd newrepo
> git remote add origin git@host:foo.git
> git push origin master
>
> then you're best off doing new work in clones and discard the repo used for
> the conversion.
>
>
Thanks for your reply. However, shouldn't it be

git push origin --all

to make sure all branches that were in the CVS will be available in the new
git repository?

 - Godmar


> git clone git@host:foo.git
>
> there's a section where importing a cvs archive is covered in this doc:
>
> http://manpages.ubuntu.com/manpages/lucid/man7/gitcvs-migration.7.html
>
>
> it'll start retrieving the CVS histories, but then fail with:
>
> fatal: Cannot lock the ref 'refs/remotes/git@mygithost:repos.git/master'.
> Cannot write branch master for update: Bad file descriptor
>
> What does that mean, and what is the correct workflow to migrate from CVS
> to git?
> I'm using git 1.7.0.4.
>
> Note that I wish to keep CVS's centralized model for now by using a
> centralized bare repository that will function as a shared upstream for all
> developers in our project; that's why I am trying to import the CVS
> repository into it.
>
> Thanks for any help.
>
>  - Godmar
>
> --
> You received this message because you are subscribed to the Google Groups
> "Git for human beings" group.
> To post to this group, send email to git-users@googlegroups.com.
> To unsubscribe from this group, send email to
> git-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/git-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.

Reply via email to