Re: How to rewrite author history
- From
Andrew Arnott <andrewarnott@gmail.com>
- Date
- Mar 22, 2008, 13:11 UTC
- Message-ID
- <216e54900803220611v5aa5e9d5q86da249480be3c91@mail.gmail.com>
- In-Reply-To
- <2008-03-22-10-29-23+trackit+sam@rfc1149.net>
Thanks. Re-importing from SVN isn't an option any more, but I ended up with something like this that seems to have worked.
git checkout master git-filter-branch --env-filter ' if [ "$GIT_AUTHOR_NAME" = "andrewarnott" ]; then export GIT_AUTHOR_EMAIL="andrewarnott@gmail.com" export GIT_AUTHOR_NAME="Andrew Arnott" fi export GIT_COMMITTER_EMAIL=$GIT_AUTHOR_EMAIL export GIT_COMMITTER_NAME=$GIT_AUTHOR_NAME '
And I did this for master, and my v1 and v0.1 branches. I'm concerned though, that since I changed the names of all the objects by doing this, did I somehow make my branches incompatible with each other? Will there be any problems in the future sharing commits or merging across branches as a result?
Thanks.
On Sat, Mar 22, 2008 at 2:29 AM, Samuel Tardieu <sam@rfc1149.net> wrote:
Show 15 quoted lines
> >>>>> "Andrew" == Andrew Arnott <andrewarnott@gmail.com> writes: > > Andrew> I imported my git repo from an SVN repo, and the authors have > Andrew> email@SOME-GUID for their email address rather than their > Andrew> actual one (probably courtesy of Google Code hosting). > Andrew> Rewriting history and changing all the commit hashes isn't a > Andrew> problem at this point in development, so how can I do a > Andrew> massive search-and-replace to replace several specific author > Andrew> emails with the valid ones? > > If you can reimport it, you can use the "--authors-file" of "git svn". > > Sam > >
-- Andrew Arnott