2011-10-10 36 views

回答

8

您可以使用-A选项来git cvsimport将用户名在CVS中映射到git中的Full Name <[email protected]>。该名男子网页显示:

-A <author-conv-file> 
     CVS by default uses the Unix username when writing its 
     commit logs. Using this option and an author-conv-file in 
     this format 

        exon=Andreas Ericsson <[email protected]> 
        spawn=Simon Pawn <[email protected]> 

     git cvsimport will make it appear as those authors had 
     their GIT_AUTHOR_NAME and GIT_AUTHOR_EMAIL set properly 
     all along. 

     For convenience, this data is saved to 
     $GIT_DIR/cvs-authors each time the -A option is provided 
     and read from that same file each time git cvsimport is 
     run. 

     It is not recommended to use this feature if you intend to 
     export changes back to CVS again later with git 
     cvsexportcommit. 

如果你不想重新运行导入,你可以看看this answer,它告诉你如何改写在每次提交使用git filter-branch作者信息。 (请注意,使用git filter-branch可以广泛地重写历史记录,因此如果您已经与任何人共享知识库,则不应这样做。)

+0

谢谢,我知道-A选项但忘记了它 - 因此过滤器 - 分支做了诡计 – thias