From owner-freebsd-git@freebsd.org Sat Mar 13 20:02:32 2021 Return-Path: Delivered-To: freebsd-git@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3BAD65A988D for ; Sat, 13 Mar 2021 20:02:32 +0000 (UTC) (envelope-from gbe@freebsd.org) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 4DyYWD1CBfz3Kw3 for ; Sat, 13 Mar 2021 20:02:32 +0000 (UTC) (envelope-from gbe@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id 294995A95CE; Sat, 13 Mar 2021 20:02:32 +0000 (UTC) Delivered-To: git@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2913A5A9714 for ; Sat, 13 Mar 2021 20:02:32 +0000 (UTC) (envelope-from gbe@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DyYWD0nGRz3KqG; Sat, 13 Mar 2021 20:02:32 +0000 (UTC) (envelope-from gbe@freebsd.org) Received: from localhost (p200300d5d740b96020afcfec3802e2f2.dip0.t-ipconnect.de [IPv6:2003:d5:d740:b960:20af:cfec:3802:e2f2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: gbe) by smtp.freebsd.org (Postfix) with ESMTPSA id 8269B59F2; Sat, 13 Mar 2021 20:02:31 +0000 (UTC) (envelope-from gbe@freebsd.org) Date: Sat, 13 Mar 2021 21:02:29 +0100 From: Gordon Bergling To: Warner Losh Cc: git@freebsd.org Subject: Re: Correction of a commit message Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Url: X-Operating-System: FreeBSD 12.2-STABLE amd64 X-Host-Uptime: 8:59PM up 4 days, 1:21, 4 users, load averages: 0.41, 0.35, 0.26 X-BeenThere: freebsd-git@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Discussion of git use in the FreeBSD project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Mar 2021 20:02:32 -0000 On Sat, Mar 13, 2021 at 12:45:38PM -0700, Warner Losh wrote: > On Sat, Mar 13, 2021, 12:30 PM Gordon Bergling 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