Re: Edit log message after commit
- From
- Tony Luck <tony.luck@gmail.com>
- Date
- Sep 29, 2005, 04:17 UTC
- Message-ID
- <12c511ca050928211769e4bf8e@mail.gmail.com>
- In-Reply-To
- <dhfjcu$36f$1@sea.gmane.org>
> Is there any method to edit the log message after committed? > I couldn't find any information in Documentation and in git mailing list.
No. Once a git object is created it is immutable (since its name is the hash of its contents). If you realise right after you make a commit that you want to change the message, you would have to redo it ... use git diff or git whatchanged to get the details and the diffs, then use git reset to backup, and re-apply.
If you have made subsequent commits, then you'll have to back those out and redo them too.
If you have published your tree, then it's better to live with the 'bad' commit than try to re-write history.
-Tony