undoing commit code example
Example 1: revert unpublished commits
git reset --hard <hash-or-ref>
Example 2: how to undo commit
git reset <commitId>
# Exemple
git reset 5310517
git reset --hard <hash-or-ref>
git reset <commitId>
# Exemple
git reset 5310517