You need to hard reset the commit.
and if you are using github also then do below steps
git reset --hard HEAD~n
git push origin <branch_name> --force
You need to hard reset the commit.
and if you are using github also then do below steps
git reset --hard HEAD~n
git push origin <branch_name> --force