Best practices for using git with CVS

前端 未结 5 1867
北恋
北恋 2020-11-28 23:49

What are your best practices and tips for using git to interface with a CVS repository?

5条回答
  •  误落风尘
    2020-11-29 00:17

    Slightly meta-answer. If you are forced to use git 'guerilla style', i.e. your company is stuck using cvs for the version control and you use git on your workstation to make life easier, you might consider doing something like this;

    CVS=realCvsPath
    # commit to the git first
    if ($ARGV[0] && $ARGV[0] eq "commit")
    {
    system 'git commit -a';
    }
    
    # execute the appropriate cvs program
    # ===================================
    exec "$CVS", @ARGV
    

    Calling this file 'cvs' and including it the path before the real CVS command. Otherwise you can have git commits older than the cvs ones, which isn't that useful...

提交回复
热议问题