git undo all commits local code example
Example 1: revert unpublished commits
git reset --hard <hash-or-ref>
Example 2: undo reset commit git
git reflog //to get commitID
git reset #commitID
git reset --hard <hash-or-ref>
git reflog //to get commitID
git reset #commitID