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

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Mar 13, 2021 at 12:45:38PM -0700, Warner Losh wrote:
> 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

Thanks for clarification. I'll use 'git show' more often before pushing local
changes.

--Gordon

> > [1]
> > https://cgit.freebsd.org/src/commit/?id=a9275d996c229a30879baa42a6d02d24663ac43b



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?YE0aVauG779umAsZ>