Answer the question
In order to leave comments, you need to log in
Git. Accidentally deleted a local file, how to recover?
YES, I can download from the hub itself, but I want to know how to download it via the console. Is it possible at all?
Answer the question
In order to leave comments, you need to log in
If the condition is:
$ git status
On branch master
Changes not staged for commit:
(use "git add/rm <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
deleted: myfile
git checkout abcde myfile # abcde — хеш коммита
# или
git checkout feature3 myfile # feature3 — имя ветки
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question