Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Mar 2021 12:45:38 -0700
From:      Warner Losh <imp@bsdimp.com>
To:        Gordon Bergling <gbe@freebsd.org>
Cc:        git@freebsd.org
Subject:   Re: Correction of a commit message
Message-ID:  <CANCZdfoO=kYa_T3dO4fuDa5ampqAT=A5p6qDS3M9b0Oi9RY-Xg@mail.gmail.com>
In-Reply-To: <YE0S7pkc%2Bn7mWRoS@lion.0xfce3.net>
References:  <YE0S7pkc%2Bn7mWRoS@lion.0xfce3.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Mar 13, 2021, 12:30 PM Gordon Bergling <gbe@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@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-git
> To unsubscribe, send any mail to "freebsd-git-unsubscribe@freebsd.org"
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfoO=kYa_T3dO4fuDa5ampqAT=A5p6qDS3M9b0Oi9RY-Xg>