git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tony Luck <tony.luck@gmail.com>
To: Kevin Leung <hysoka@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Edit log message after commit
Date: Wed, 28 Sep 2005 21:17:00 -0700	[thread overview]
Message-ID: <12c511ca050928211769e4bf8e@mail.gmail.com> (raw)
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

  parent reply	other threads:[~2005-09-29  4:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-29  2:28 Edit log message after commit Kevin Leung
2005-09-29  4:15 ` Junio C Hamano
2005-09-29  4:17 ` Tony Luck [this message]
2005-09-29  4:58 ` Brian Gerst
2005-09-29  7:45 ` Kevin Leung
2005-09-29 16:05   ` Yasushi SHOJI
2005-09-30  8:24     ` Junio C Hamano
2005-09-29  8:35 ` Catalin Marinas
2005-09-30  7:58   ` Kevin Leung

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=12c511ca050928211769e4bf8e@mail.gmail.com \
    --to=tony.luck@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=hysoka@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).