Someone has done a git reset --hard f7fe845
and they pushed it into a branch in the repo.
Now in that branch we can't see any work done before that commit. Effectively loosing all work on that branch's work.
We need to revert that git reset and get the branch to the previous version, but at least on the git website or source-tree is like the other commits don't exist anymore.
Is there any hope to get the information back? How?
My branch is feature/UAL-117
[ec2-user@ame]$ git reflog
8c0136d HEAD@{0}: reset: moving to HEAD~1
f7fe845 HEAD@{1}: checkout: moving from develop to feature/UAL-117
f7fe845 HEAD@{2}: checkout: moving from feature/UAL-117 to develop
f7fe845 HEAD@{3}: checkout: moving from develop to feature/UAL-117
f7fe845 HEAD@{4}: checkout: moving from feature/UAL-117 to develop
f7fe845 HEAD@{5}: reset: moving to f7fe845df3efc0a6b79b4ccde50ab08fc542532f
6a03be3 HEAD@{6}: checkout: moving from develop to feature/UAL-117
f7fe845 HEAD@{7}: checkout: moving from f7fe845df3efc0a6b79b4ccde50ab08fc542532f to develop
f7fe845 HEAD@{8}: checkout: moving from feature/UAL-117 to f7fe845df3efc0a6b79b4ccde50ab08fc542532f
6a03be3 HEAD@{9}: pull: Fast-forward
24e9afe HEAD@{10}: pull: Fast-forward
d238450 HEAD@{11}: checkout: moving from develop to feature/UAL-117
f7fe845 HEAD@{12}: pull: Fast-forward
8c0136d HEAD@{13}: checkout: moving from feature/UAL-117 to develop
d238450 HEAD@{14}: checkout: moving from feature/UAL-117 to feature/UAL-117
d238450 HEAD@{15}: checkout: moving from develop to feature/UAL-117
8c0136d HEAD@{16}: checkout: moving from feature/UAL-117 to develop
d238450 HEAD@{17}: commit (merge): feature/UAL-117 update composer.lock
dd89670 HEAD@{18}: checkout: moving from develop to feature/UAL-117
You can run:
git reflog
And hope to see something like "d238450 HEAD@{17}: commit ....
"
in the output.
And then:
git reset --hard <commit>
Where <commit>
points to the snapshot you would like to restore (eg: d238450
).