H
H
HabrDima202020-10-15 18:22:10
git
HabrDima20, 2020-10-15 18:22:10

What to do git erase project files? How to recover?

Good afternoon. I have a problem, I tried to push a project to git, I committed it but could not push it, I got an unnecessary file and tried to delete that file from the commit, and the project rolled back to the previous commit! I'm in a panic what to do????

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexander, 2020-10-15
@z80b

git reflog will help you, look there, commits don't just disappear anywhere

T
toxa82, 2020-10-15
@toxa82

You would write the commands you were executing. If reset then try git reset --hard ORIG_HEAD

O
OCTAGRAM, 2020-10-15
@OCTAGRAM

Git has something like a Recycle Bin where garbage is stored for 30 days

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question