This case is a little trickier, but far from impossible! The story here is that you've been doing quite a bit of work, and it's spread on a couple of different commits. The task is finished and the work has been pushed for review. Then the grumpy reviewer comes in and puts some remarks on the second commit out of four. The example below uses the myTaskToSolve branch, but it's only an example.
~/coremw > git checkout myTaskToSolve
~/coremw > git rebase --interactive HEAD~4
A editor window (for the interactive rebase) will pop up, looking something like the following:
pick 15f9f4e Makefiles for ntfSubscribe added.
pick 35c0506 Enable --with-rpm-release option in configure script. Enable basic make rpm
pick 52e60c0 Minor changes in mdf/cmwmdf files to get a further compilation
pick d317b92 Fix minor typos about libimmutil and liblogtrace
# Rebase 639edf4..d317b92 onto 639edf4
#
# Commands:
# p, pick = use commit
# r, reword = use commit, but edit the commit message
# e, edit = use commit, but stop for amending
# s, squash = use commit, but meld into previous commit
# f, fixup = like "squash", but discard this commit's log message
# x, exec = run command (the rest of the line) using shell
#
# These lines can be re-ordered; they are executed from top to bottom.
#
# If you remove a line here THAT COMMIT WILL BE LOST.
#
# However, if you remove everything, the rebase will be aborted.
#
# Note that empty commits are commented out
~
The top-most commit is the last commit done in develop, the one that we want to change is 52e60c0 regarding changes in mdf, some comments where done on that particular change. Simply replace pick with edit in front of 52e60c0, then save the buffer and exit.
Now do the necessary rework so that the review might pass. Don't forget to do git add ChangeFile, and then finally git commit --amend (Don't change the Commit-Id). Once the commit is done, do git rebase --continue and finally git push-for-review.
~/coremw > vi ChangeFIle
~/coremw > git add ChangeFile
~/coremw > git commit --amend
~/coremw > git rebase --continue
~/coremw > git push-for-review
git-20_It's NOT the last commit that has been rejected
This case is a little trickier, but far from impossible! The story here is that you've been doing quite a bit of work, and it's spread on a couple of different commits. The task is finished and the wo...