Git revert old commit

I want to remove my 4th commit from last.

 Command  Info
 git log -6  to check last 6 commits
git rebase -i HEAD~4  to rebase last 4 commits
i i to select row

remove the entire line of commit to be deleted

click esc

:

wq

to Save

: to enter text in cmd

w to write and q to escape

git push –force origin master to push the revert