git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Shawn Pearce <spearce@spearce.org>
To: Jon Masters <jcm@redhat.com>
Cc: git@vger.kernel.org
Subject: Re: changing log entries
Date: Wed, 13 Dec 2006 18:24:52 -0500	[thread overview]
Message-ID: <20061213232452.GE32568@spearce.org> (raw)
In-Reply-To: <1166051281.1808.1.camel@jcm.boston.redhat.com>

Jon Masters <jcm@redhat.com> wrote:
> Hi,
> 
> So I figured out that the problem with "Can't lock ref" was down to not
> having set one of the scripts executable on the http server. Great.
> 
> Anyway, now I would like to change an existing log entry to make it a
> bit cleaner (read: add a first line that's under 80 characters). What's
> the best way to change an existing log entry for a commit?

If its the most recent commit on that branch, "git commit --amend".

Otherwise dump out the branch to patches with git format-patch,
amend the commit in question, then replay the patches with git am.

Or use StGIT to uncommit the changes, pop them off, fix the commit,
then repush the patches and recommit in StGIT.


Note that any of the above methods change the SHA1 of that commit
and every commit which follows it on that branch.  Consequently it
is generally considered to be impolite to edit commits without
warning which you have already published, as another person may be
basing their own work off that commit.

-- 

  parent reply	other threads:[~2006-12-13 23:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-13 23:08 changing log entries Jon Masters
2006-12-13 23:22 ` Jakub Narebski
2006-12-13 23:24 ` Shawn Pearce [this message]
2006-12-14 10:37 ` Andy Parkins
2006-12-15  8:48   ` Jakub Narebski

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=20061213232452.GE32568@spearce.org \
    --to=spearce@spearce.org \
    --cc=git@vger.kernel.org \
    --cc=jcm@redhat.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).