After running git reset HEAD~1, I noticed that actually there was nothing else to do and the commit was fine. Is there a way to revert this command?
git reset HEAD~1
You could see the commit id of that commit with git reflog.
git reflog