你在使用git与CVS仓库进行交互时的最佳实践和提示是什么?
我只是为了向朋友展示Git而使用Git-CVS交互,但这非常简单。
cvsps
. Git cvsimport
uses this to access CVS history.We found that, for a large project, inital set-up was much faster by taking a full copy of the CVS repo onto your computer, and doing the git cvsimport
locally:
$ rsync rsync://yourprojecthost.com/cvsroot/yourproject/*
$ mkdir myproject.git
$ cd myproject.git
$ git cvsimport -p -x -v -d :local:/path/to/cvsroot/yourproject
git cvsimport -p -x -v -d :local:/path/to/cvsroot yourproject
- Archenothcvsimport
(还有其他工具可以完成此任务),所以你提倡放弃所有先前的修订信息?这是一个可怕的解决方案。 - Brad MaceCVS
添加到.gitignore
中,而不是提交到git中,你会得到什么好处?这样做不会使你的git存储库不完整吗?请参见https://dev59.com/v3RB5IYBdhLWcg3wiHpl#37585092和http://stackoverflow.com/q/37585385/1122270,了解我的意思。 - cnstCVS=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
CVS/{Entries,Repository,Root}
文件提交到我的git
仓库中非常有用。
这使得不必拥有多个独立的工作区变得非常容易,在任何机器上使用git
进行检出,然后在原地执行cvs up
或cvs diff
以生成正确的CVS补丁,以便邮寄给没有git的上游维护者。