git merge pushed commits

Shell
git push origin +master
git rebase -i origin/master~4 master

Source

Also in Shell: