• list commit log
$ git log
or
$ git log --oneline
  • find SHA-ID of your commit, then:
$ git rebase --interactive $SHA^
or
(list last e.g. 3 commit)
$ git rebase -i HEAD~3
  • Change ‘pick’ to ‘edit’ for your commit that you want to edit

  • make your changes in files etc.

  • add your changes & edit commit message:

$ git commit -a --amend
  • end rebase
$ git rebase --continue
  • or cancel
$ git rebase --abort
  • push changes to remote server
git push --force-with-lease <origin> <test-branch>

(or $ ./logerrit submit master for LibreOffice)