git squash last two pushed commits without rebase code example Example: squash pushed commits git rebase -i origin/master~4 master git push origin +master