On 11/14/2014 01:57 PM,
naveen...@gmail.com wrote:
> Hi ,
>
> 1> Assume i have two commits which have been pushed to Gerrit with Ids
> as 23 and 24 .
> my commit corresponding to 24 id is fine whereas , some review comments
> were given for 23 id .
>
> If review comments were for the latest commit , then i would have
> uploaded the same with the help of "git commit --amend" .
> How to handle this situation , since it is not my latest commit .
> Can please someone help me to correct this ?
>
Use interactive rebase:
$ git rebase -i HEAD~2
(change "pick" to "edit" on the line for commit 23)
(save and exit)
(make the changes to commit 23)
$ git commit -a --amend
$ git rebase --continue
$ git push origin HEAD:refs/for/master
The last step assumes you have Change-ID lines in your commit messages.
> 2> What is the best configuration to be used to avoid "^M" characters ,
> as we work on both unix and windows .
>
Note sure, but try something like:
$ git config core.autocrlf=false