git reset hard one commit back code example Example: git hard reset to commit id git reset --hard <commit-hash> git push -f origin master