This is the mail archive of the
mailing list for the GCC project.
Re: Fixing gcc git logs
- From: Janne Blomqvist <blomqvist dot janne at gmail dot com>
- To: Jerry <jvdelisle at charter dot net>
- Cc: gcc mailing list <gcc at gcc dot gnu dot org>
- Date: Thu, 2 Jan 2020 11:33:58 +0200
- Subject: Re: Fixing gcc git logs
- References: <email@example.com>
On Thu, Jan 2, 2020 at 4:00 AM Jerry <firstname.lastname@example.org> wrote:
> In the following git log entry, I made a typo on the PR number in the
> libgfortran ChangeLog file. I noticed this right after the git commit,
> while editing the git log.
> So I quit the edit without saving and git reported that the commit was
> Then I edited the my local ChangeLog file, did git add . and git commit
> again. In this case the git log edit started as usual and I recopied
> the correct text into my editor (VI) and saved it. The commit proceeded
> as I expected. Then I did the git svn dcommit
> Well the git log ended up like this. How to fix? How to avoid?
> The 90274 should have been 90374. The actual committed files are OK.
Not sure what you did wrong. I guess to fix it you need to make a
separate commit and push that.
In general, before you push your changes to some public tree, you can
engage in various forms of history rewriting. For instance, if you
forgot something or realized you made a mistake in your latest commit,
you can fix the error, and then do a "git commit --amend" which
instead of creating a new commit will add your changes to your
Another option is the interactive rebase (git rebase -i). That allows
you to e.g. "squash" commits, that is, combine two or more commits