git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Editing Git Log

From
Matthias Kestenholz <mk@spinlock.ch>
Date
Sep 18, 2008, 06:21 UTC
Message-ID
<1f6632e50809172321y6343a3aau27e2ecd719185060@mail.gmail.com>
In-Reply-To
<48D1ECB4.9080808@tensilica.com>

On Thu, Sep 18, 2008 at 7:52 AM, Piet Delaney <piet.delaney@tensilica.com> wrote:

Show 14 quoted lines
> I think I recall reading that a feature of git was the prevention of the git
> commits
> from being changed. I noticed today that a couple of us have checked in
> files
> without our customary [XTENSA] architecture prefixed to the 1st line of our
> Commit Messages.
>
> I couldn't find a way to do this, other than our reverting back to a earlier
> repository
> and recommitting (each?) change with the slightly changed Commit Message;
> not an attractive investment of our time.
>
> Any suggestions?
>

You have to create new commits, but you do not have to do it by hand. See filter-branch[1]

The example given in the manpage removes the git-svn identifiers:
git filter-branch --msg-filter '
        sed -e "/^git-svn-id:/d"
'

You can probably modify the sed expression and use it nearly as is (of course you would not want to filter the whole history, only the handful commits that came from you or your team.

[1]: http://www.kernel.org/pub/software/scm/git/docs/git-filter-branch.html
Previous: Björn Steinbrink
Message 4 of 4 in “Editing Git Log”
  1. Piet DelaneySep 18, 2008
  2. Boaz HarroshSep 18, 2008
  3. Björn SteinbrinkSep 18, 2008
  4. Matthias KestenholzSep 18, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.