Correction of a commit message

Warner Losh imp at bsdimp.com
Sat Mar 13 19:45:52 UTC 2021


On Sat, Mar 13, 2021, 12:30 PM Gordon Bergling <gbe at freebsd.org> wrote:

> Hi,
>
> I made a small mistake while commiting a change for the ls(1) man pagei
> [1]. I used
> 'git commit --amend' and corrected the commit-message, but I wasn't be
> able to
> push that commit, because git reported, that my local tree was outdated,
> which
> is simply not correct.
>
> Is the '--amend' option intended to work in that situation, or did I miss
> something?
>

You can use that before you push, but not after. We've been recommending
'git show' for each commit prior to pushing... After the push, it's not
possible to change.

Warner


--Gordon
>
> [1]
> https://cgit.freebsd.org/src/commit/?id=a9275d996c229a30879baa42a6d02d24663ac43b
> --
> _______________________________________________
> freebsd-git at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-git
> To unsubscribe, send any mail to "freebsd-git-unsubscribe at freebsd.org"
>


More information about the freebsd-git mailing list