Sometimes, when using Code review, you need to modify an old commit with the suggestions. I used to create a new commit for the modifications, but this is non clean, intuitive (if you wrap commits by task), nor backwards compatible.

There is a better way to this using git rebase, which basically allows you to change a commit and apply those changes to further commits.

In order to do that, we need to rebase the commit this way.
1º- Checkout the branch
2º- git rebase –interactive ‘xxxxxx^’
3º- In the editor, change ‘pitch’ to ‘edit’ on the commit we want to modify.
4º- Make the changes
​5º- git commit –all –amend –no-edit
6º- git rebase –continue
​7º- git push (–force) origin <branch_name>​
I hope it helps