Take the 2-minute tour ×

I'm working on converting some Subversion repositories over to Git using the git-svn tool. I noticed that even though it imports the author information correctly, the committer information does not match the author information (e.g. the committer date is the date/time I ran the git-svn tool).

Is there a way to make the committer information match the author information on import from Subversion? If not, how can I use git-filter-branch to rewrite the commits to correct this (i.e. copy author info into committer info for each commit)?



Git-svn is not causing this problem, I am! I've been rebasing the Subversion history, and that is changing the committer date. So, does any one how to use git-filter-branch to change this (i.e. copy author info into committer info for each commit)?

share|improve this question
FWIW, I also use git-svn and it doesn't behave this way for me. The committer and author information always match. –  Dan Moulding Oct 29 '09 at 13:08
I figured out what was happening - I've been rebasing the SVN history, and that is changing the committer date. –  Jordan Oct 29 '09 at 13:40
Since it is not a problem with git-svn, anyone know how to copy the author info into the committer info field using a filter-branch? –  Jordan Oct 29 '09 at 13:41
add comment

1 Answer

up vote 1 down vote accepted

You're looking for the --env-filter mode of filter-branch. The relevant environment variables are GIT_AUTHOR_NAME, GIT_AUTHOR_EMAIL, GIT_AUTHOR_DATE, GIT_COMMITTER_NAME, GIT_COMMITTER_EMAIL, and GIT_COMMITTER_DATE.

Your command will be something like:

git filter-branch --env-filter '

The --all specifies that this should operate on all branches. Your original refs will be preserved in the refs/original namespace in case you mess up.

And of course, I can't post anything like this without a warning of the dangers for anyone who may happen upon it. From man git-filter-branch:


share|improve this answer
This was the correct answer, however there was a minor typo: you cannot put the '=' character after --env-filter; it must be a space. Other than that it worked perfectly. Thanks! –  Jordan Oct 30 '09 at 12:15
Sorry about that - fixed! –  Jefromi Oct 30 '09 at 16:57
add comment

Your Answer


