Tell git that two users are equivalent after cvsimport

After doing

git cvsimport 

my previous commits are listed as belonging to user "user" (user is my unix username).

How can I tell git that these commits are mine (that is, they determine the mapping from "user" to my "First Lastname < first@last.com >" git -user)?

+4
source share
1 answer

You can use the -A option for git cvsimport to map usernames in CVS to Full Name < email@address > in git. The manual page says:

  -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. 

If you do not want to restart the import, you can see this answer , which explains how to rewrite the author information in each commit using git filter-branch . (Note that using git filter-branch for this greatly rewrites the story, so you should not do this if you have already shared the repository with anyone.)

+8
source

All Articles