开发者

converting cvs repositories to git [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 10 years ago开发者_开发技巧.

How to convert a CVS repository to a git repository?

  • I have tried using git cvsimport command like this:

    git cvsimport -v -d :pserver:thillaiselvan@(my_cvs_server_root) -r cvs -k (module_name)

  • But the process stalls in the middle for minutes with this message:

    cvs [rlog aborted]: could not chdir to file_name_config: Permission denied

  • Despite that a directory is created with .git but shows fatal error when trying to check git log:

    git log

    fatal: bad default revision 'HEAD'

  • On checking the status:

    git status

    On branch master

    Initial commit

    nothing to commit (create/copy files and use "git add" to track)


I use git --bare cvsimport -d:local:/cvsroot/$PROJECT -v -k -m -i -A Authors -o master $PROJECT to import cvs project from the local repository (or mirror) into a local bare git repository that is suitable for being exposed to remote developers. This can do incremental updates if you are still using CVS as the primary repository.

However you should also look at cvs2git as this can be better sometimes but is more appropriate for a one-off conversion to git. cvsimport can have trouble with vendor branches so it is important to very carefully check your newly imported repository. In both cases it can take a long time for large repositories (possibly hours on a slower machine with a 10year old cvs repository).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜