For squashing two commits, one of which was already pushed, on a single branch the following worked:
git rebase -i HEAD~2
[ pick older-commit ]
[ squash newest-commit ]
git push --force
By default, this will include the commit message of the newest commit as a comment on the older commit.