4
後相當於做告訴git的兩個用戶都cvsimport
git cvsimport
後我以前提交列出屬於用戶的「用戶」(用戶是我的UNIX用戶名)。
如何告訴git這些提交是我的(即,定義從「用戶」到我的「第一個姓氏<[email protected]>」git-user)的映射?
後相當於做告訴git的兩個用戶都cvsimport
git cvsimport
後我以前提交列出屬於用戶的「用戶」(用戶是我的UNIX用戶名)。
如何告訴git這些提交是我的(即,定義從「用戶」到我的「第一個姓氏<[email protected]>」git-user)的映射?
您可以使用-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
可以廣泛地重寫歷史記錄,因此如果您已經與任何人共享知識庫,則不應這樣做。)
謝謝,我知道-A選項但忘記了它 - 因此過濾器 - 分支做了詭計 – thias