how to restore hard reset commit in git code example Example: git hard reset to commit id git reset --hard <commit-hash> git push -f origin master