Squash <n-amount-of-last-commits>
locally for <branch>
$ git rebase -i origin/<branch>~<n-amount-of-last-commits> <branch>
and then force push to remote <branch>
git push origin +<branch>
Squash <n-amount-of-last-commits>
locally for <branch>
$ git rebase -i origin/<branch>~<n-amount-of-last-commits> <branch>
and then force push to remote <branch>
git push origin +<branch>