Like Thomas said earlier, you can change you commit message with git rebase
--interactive:

git rebase --interactive ad9d46d348542bb4b7d8d09fbe6b4a6548cb68ff
It you open a editor with all commit after the one you passed to git
rebase. You only need to change the word "pick" for "reword" in the line
that represets you commit.

Remember that if you already pushed this commits to a remote repository,
you need a push --force and other people that will pull this repository
might have a problem.


William Seiti Mizuta
@williammizuta
Desenvolvedor da Caelum



On Tue, Dec 11, 2012 at 12:34 PM, John McKown
<john.archie.mck...@gmail.com>wrote:

> I've just been reading up on git filter-branch --msg-filter which seems to
> be a way to address this. But I don't have enough aspirin to make it
> through the explanation (it makes my head hurt) <grin/>
>
> I wish there was a simple way to just use the user's $EDITOR to clean this
> up. I have a feeling that once I get my head wrapped around it, that
> filter-branch will be a wondrous way to do some horrible things.
>
>
> On Tuesday, December 11, 2012 5:53:50 AM UTC-6, Thomas Ferris Nicolaisen
> wrote:
>>
>>
>>
>> On Tuesday, December 11, 2012 8:45:14 AM UTC+1, lei yang wrote:
>>>
>>> HI experts
>>>
>>> my git log is something like
>>> #git log
>>>
>>> ........................
>>> ........................
>>>
>>> commit a83052d1f102341bb5931955658266**882d7b8953
>>> Author: Lei Yang <yangle...@gmail.com>
>>> Date:   Tue Dec 11 13:36:45 2012 +0800
>>>
>>>     add testfileA2.add
>>>
>>> commit b8558af3986384e657bfdbc4815483**0395b340c6
>>> Author: Lei Yang <yangle...@gmail.com>
>>> Date:   Tue Dec 11 13:30:10 2012 +0800
>>>
>>>     rm testfileA1.add
>>>
>>> commit ad9d46d348542bb4b7d8d09fbe6b4a**6548cb68ff
>>> Merge: acaa35d aaa479a
>>> Author: Lei Yang <yangle...@gmail.com>
>>> Date:   Tue Dec 11 13:37:01 2012 +0800
>>>
>>>     Merge branch 'master' of github.com:leiyang/git_testA
>>>
>>>
>>> I find "rm testfileA1.add" is wrong, I want to change it to "add
>>> testfileA1.add", and DON'T leave "rm testfileA1.add" info in the
>>> commit log
>>> Is it possible?
>>>
>>> Lei
>>>
>>
>>
>> If the relevant commits are not yet pushed/shared/published, you can
>> rewrite the commit messages using interactive rebase. See
>> http://git-scm.com/book/en/**Git-Tools-Rewriting-History#**
>> Changing-Multiple-Commit-**Messages<http://git-scm.com/book/en/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages>
>>
>>
>  --
>
>
>

-- 


Reply via email to