On Jul 27, 5:48 pm, misha680 <misha...@gmail.com> wrote:
> If I do something like:
> git reset HEAD^
>
> my commit becomes non-empty, but then I am obviously on a different
> commit when I do
>
> git commit --amend

Sorry I was wrong to suggest to do 'git reset'. In fact 'git reset
HEAD^' is the right thing to do.

Assuming you had commits ABCD (D being HEAD), when git pauses for you
edit commit C the conditions are that you just made the commit C and
both your index and working directory are clean. So it's no surprise
that 'git reset' does nothing. When you do 'git reset HEAD^', you
basically resets your index to that of B, and diff of B and C leaves
your working directory dirty so that you can make the next commit
which would replace C.

HTH
Jeenu

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-us...@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.

Reply via email to