On Thu, Jan 2, 2020 at 4:00 AM Jerry <jvdeli...@charter.net> 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
> aborted.
>
> 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
previous commit.

Another option is the interactive rebase (git rebase -i). That allows
you to e.g. "squash" commits, that is, combine two or more commits
into one.


-- 
Janne Blomqvist

Reply via email to