完成后
git cvsimport
我以前的提交属于用户“user”(用户是我的 unix 用户名)。
我如何告诉 git 这些提交是我的(即定义从“user”到我的“First Lastname
最佳答案
您可以使用 -A
git cvsimport
的选项将 CVS 中的用户名映射到 Full Name <email@address>
在混帐。手册页说:
-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 <ae@op5.se>
spawn=Simon Pawn <spawn@frog-pond.org>
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
会大量重写历史记录,因此如果您已经与任何人共享了存储库,则不应这样做。)
关于git - 在 cvsimport 之后告诉 git 两个用户是等价的,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7713268/