On Oct 22, 2013 5:39 PM, "PJ Weisberg" <p...@irregularexpressions.net> wrote:
> On Tue, Oct 22, 2013 at 1:55 PM, Vicki Kozel <vickiko...@gmail.com> wrote:
>> Hi Marcelo,
>> I do not want to abandon this change, I want to keep it and the commit
unchanged. I think this is a good practice in Gerrit to keep adding patches
to the same change - to the same commit - which allows for better change
tracking and tighter code gating.
> You can't add patches to the same commit.  A commit is one snapshot.
> If you do a normal commit, your branch will have two commits: the one
with that introduces the bad change, and another one that undoes it.
> If you do a commit with '--amend', like you're trying to do now, your
branch will have only one commit, which introduces no changes whatsoever.
You can certainly do that.  Git tells you how in the error message you
quoted.  It just seems like a silly thing to do, so Git is asking you if
you're really sure you want to do it.

If I were in your place, I would use --amend, not to undo the commit, but
to fix it so that it does what it was intended to do without whatever bug
was uncovered.  That way the history would show one state where the feature
was not implemented, then another where it was implemented. The --amend
serves to overwrite or replace the intermediate state, where the feature is
implemented incorrectly.

You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to