Answer the question
In order to leave comments, you need to log in
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:
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:
What to do?How to return?
Answer the question
In order to leave comments, you need to log in
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.
git reset --hard [email protected]{1}
orgit reset --hard 8276ba2
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question