I have mistakenly delete last commit using:
git reset --hard HEAD^
There is any process to get the previous data.
I have mistakenly delete last commit using:
git reset --hard HEAD^
There is any process to get the previous data.
You didn't delete the last commit; you merely reset the current branch to point to that commit's parent. git reflog
will tell you what you previously had checked out; you can simply git reset --hard
back to that commit.
Check out git reflog, which allows you to see the commits that are not referenced by any branch. It is well explained by this SO answer