I have a checkout copy of a remote git repository in my workstation. I have accidentally committed a change in my local and pushed to remote. Now I want to remove the last commit and go back to the previous commit and the same should be pushed to remote.
I am okay if it is a new commit with a commit message. How to do that?