V
V
Vladimir2018-02-28 14:48:53
git
Vladimir, 2018-02-28 14:48:53

Lost all code via git --reset merge. How to return?

Help out guys! Accidentally lost all code by typing git --reset merge. VS code gave an error and didn’t upload it to github, I started to google, the answer with this solution was recognized as the best on stackoverflow, so I entered ((. They write that you can return via reflog. I entered it in the console, this is what it showed:
5a969788ee4c4940355564.png
I want to return to the HEAD state @{1}: commit: finished
I consulted with one person, he told me to enter git reset --hard HEAD~1 .I entered it, no files appeared, now it shows like this:
5a9697944939b496118048.png
What to do?How to return?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
Vladimir, 2018-02-28
@connecticum

Restored everything! Via git reset --hard <branch name>

A
Alexander, 2018-02-28
@vetlugins

Write again...

J
jcmvbkbc, 2018-03-01
@jcmvbkbc

I want to return to the state [email protected]{1}: commit: finished
I consulted with one person, he told me to enter git reset --hard HEAD~1.

Where he wanted to return - so it was necessary to write:
git reset --hard [email protected]{1}orgit reset --hard 8276ba2

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question