I'm currently learning git, and I have issue what exactly do these commands do?
git reset --hard HEAD~1
git checkout .
What's the difference between the two? They both permanently delete the last commit, as I understand. I think that there is a deep difference, so I hope for a clear explanation because I'm a beginner.