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.
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to