How to squash last X commits after they have been pushed

git rebase -i zafer/fix_bug~3 zafer/fix_bug
pick e14fefe3 Fix bug on Safari
squash 743e3b47 Fix tests
squash 137ecdfd Fix wrong naming
# This is a combination of 3 commits.
# This is the 1st commit message:
Fix bug on Safari# This is the commit message #1:# Fix tests# This is the commit message #2:# Fix wrong naming
git push --force

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store