How can I roll back to the last commit both local branch and master branch?
$ git reset --hard HEAD^
HEAD is now at e861a3e Added push menu label.
$ git status
On branch master
Your branch is behind 'origin/master' by 1 commit, and can be fast-forwarded.
(use "git pull" to update your local branch)
nothing to commit, working tree clean
It asks me to pull. But if I pull I wiil get the same commit back from the master branch.
I made a mistake in my code and I have committed and pushed. So I need to roll back the commit and the push.
How can this be done correctly?