From: Jared Hance <jaredhance@gmail.com>
To: git@vger.kernel.org
Subject: Re: Git feature request: --amend older commit
Date: Fri, 17 Aug 2012 21:41:39 -0400 [thread overview]
Message-ID: <20120818014139.GA11100@gentoo.cinci.rr.com> (raw)
In-Reply-To: <20120817154749.11762.qmail@science.horizon.com>
On Fri, Aug 17, 2012 at 11:47:49AM -0400, George Spelvin wrote:
> Something like "git commit --fixup HEAD~3", where "git commit --fixup HEAD"
> would be equivalent to "git commit --amend".
Aside from the ways others mentioned on how to do this, I think that a
better interface if this were to be added would be to make the commit an
optional parameter of --amend. Adding another parameter which
effectively does a superset of --amend sounds unnecessary.
I often want to amend a commit, but its simply too much work, so I
usually commit it marking the message as something like
"fixup! ...". Then, before I push, I make sure to rebase all of
the commits marked as fixups. Clearly autosquash does this, but to have
to override the editor as "true" is just a hassle.
I feel like this is a common enough need that it deserves more first
class support than relying on the rebase command and then using true as
an editor. Either it should be supported natively or it should be
possible to autosquash a rebase without --interactive, since at present
--autosquash requires --interactive, which isn't nice for when the user
does not want the rebase to be interactive. Such a simple task shouldn't
require an interactive command.
next prev parent reply other threads:[~2012-08-18 1:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-17 15:47 Git feature request: --amend older commit George Spelvin
2012-08-17 16:33 ` Michael Haggerty
2012-08-17 17:00 ` George Spelvin
2012-08-17 16:37 ` Thomas Rast
2012-08-18 1:41 ` Jared Hance [this message]
2012-08-18 21:57 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120818014139.GA11100@gentoo.cinci.rr.com \
--to=jaredhance@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).