When I work on a branch, before to push the changes, I squash my single local commit in this way:
$ git add .
$ git commit -m 'x'
$ git rebase -i HEAD~2
# here I choose the option 'f' in the VI editor for the commit 'x'
# to keep the comment from the first and save `:wq`
and finally update remote commit
$ push -f
Is there a way to avoid the above steps commit/rebase/choose-f/save/exit?