Discussion:
GIT Question
(too old to reply)
Richard Heck
2011-07-16 20:01:11 UTC
Permalink
Suppose I have just committed something, and I now want to make a minor
git commit -a
git rebase -i HEAD^^
and then fold the new commit into the last one. Is there an easier way
to do this using git reset?
are you aware of git commit --amend ?
Yes, but perhaps I didn't speak clearly. What I meant was: I want to
make a minor modification to what I just committed, not to the log
message. So, e.g., I notice a typo in the doxy for my new routine, so I
fix that. Then I commit it and rebase. It looks to me as if I ought to
be able to use reset to roll the new stuff into the last commit. But
maybe not, and I can't see how to do it.

Richard
Pavel Sanda
2011-07-17 09:26:55 UTC
Permalink
What I meant was: I want to make a
minor modification to what I just committed, not to the log message. So,
e.g., I notice a typo in the doxy for my new routine, so I fix that. Then I
untested, but something like
git add corrected_file; git commit --amend
should help.

pavel

Continue reading on narkive:
Loading...