After git pull I have done git reset hard to undo the merge with commit id before merge.Somehow my entire commit is gone and I cant the see the commit in history also. But I have the commit id , on git show command I can see my changes.
How can I get back my changes and how to track what mistake I have done
if you have the commit hash, and you have not run garbage collection, you can always go back to that commit with
git checkout <sha1>
. if you want to re-apply it on top of your current head, you could dogit cherry-pick <sha1>