To squash the last 3 commits into one:
git reset --soft HEAD~3 git commit -m "New message for the combined commit"
git push origin +name-of-branch
The plus sign forces the remote branch to accept your rewritten history, otherwise you will end up with divergent branches
git push origin name-of-branch