1.

How to restore a deleted file in Git?

Answer»

How to restore a deleted file in Git?
There are two steps to restore a deleted file in Git as per given below steps
(1)First we need to find the COMMIT Id where we deleted the file
git rev-list -n 1 HEAD -- filename
(2)In second STEP we CHECKOUT that commit id to get that file
git checkout deleting_commit_id^ -- filename



Discussion

No Comment Found