rever last commit commit code example
Example 1: revert commit git
git revert <commit hash>
Example 2: how to undo commit
git reset <commitId>
# Exemple
git reset 5310517
git revert <commit hash>
git reset <commitId>
# Exemple
git reset 5310517