I have a project where I am using git. My code has not been pushed to a server. It was on my local machine only.
I want to undo the last commit, so I executed git reset --hard HEAD~1
But that command deleted the files from the project instead of undoing the last commit. How can I undo the git reset --hard HEAD~1
command to my work isn't lost?
When I executed the it reset --hard HEAD~1
I got HEAD is now at 7a524b86f not sure