Re: Retroactively change email signature?
- From
Linus Torvalds <torvalds@linux-foundation.org>
- Date
- Jan 2, 2008, 21:24 UTC
- Message-ID
- <alpine.LFD.1.00.0801021316080.3010@woody.linux-foundation.org>
- In-Reply-To
- <9b3e2dc20801021237v4d5d236fn3d2643502b9bb78f@mail.gmail.com>
On Wed, 2 Jan 2008, Stephen Sinclair wrote:
Show 5 quoted lines
> > Is it possible to retroactively change the author and email of several > commits? Perhaps some sort of search-and-replace for the commit > metadata? Even for older commits, I'd like to change the email > addresses to my current address.
See
man git-filter-branch
and the "--env-filter" flag (and "--msg-filter" if you also want to change things like Sign-off's etc in the message text itself)
BUT! See also the big bold-face warning: using "filter-branch" will not change old commits, it will create a series of *new* commits that bear a striking resemblance to the old ones, but are not the same. So you'll have a totally new history.
That matters for things like - if you've already publicised the old history, you need to tell people that they should fetch things anew - if you refer to the commit SHA1's elsewhere (like in commit messages that revert previous commits), those SHA1's are still "valid", but they refer to the *old* history, not the new history you created.
(I don't think git-filter-branch even exposes any easy way to remap the "revert commit xyz" messages in the message format. It's not technically hard to use a --msg-filter for it, but it seems a big bother).
Linus