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