2011-10-10 38 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