I've hard reset to a particular commit. After do that my changes are gone. Can I get back my changes in git?
I'd following steps.
git reset --hard [commit id]
git push origin [branch name] --force
I've hard reset to a particular commit. After do that my changes are gone. Can I get back my changes in git?
I'd following steps.
git reset --hard [commit id]
git push origin [branch name] --force
As @William mentioned, reflog should do the trick
Look at the image above of git reflog. I followed the following steps:
git reset 83a0402
which is the sha for the second commit. You should be able to see your changes now