tto / docs / git / undo a commit and push an older version to remote

first reset locally, use HEAD~ to reset latest commit. use HEAD@{xx} to reset to another commit where xx is a number returned from git reflog.

git reset HEAD~ --hard

if you want to reset to a specific commit id, use git reset --hard 0d1d7fc32

then push the local version using the force flag.

git push --force origin